|
|
@@ -4,7 +4,7 @@ |
|
|
|
<van-tabbar route :placeholder="true" > |
|
|
|
<van-tabbar-item replace to="/lawEnforcement" icon="wap-home-o">首页</van-tabbar-item> |
|
|
|
<van-tabbar-item replace to="/lawEnforcement/productsList" icon="shop-o">农用品</van-tabbar-item> |
|
|
|
<van-tabbar-item replace to="/lawEnforcement/caseList" icon="apps-o" v-if="tabShow">案件</van-tabbar-item> |
|
|
|
<van-tabbar-item replace to="/lawEnforcement/caseList" icon="apps-o">案件</van-tabbar-item> |
|
|
|
<van-tabbar-item replace to="/lawEnforcement/user" icon="contact">我的</van-tabbar-item> |
|
|
|
</van-tabbar> |
|
|
|
</div> |
|
|
@@ -20,19 +20,20 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
getUserProfile().then(response => { |
|
|
|
if (response.data.roles.length < 1){ |
|
|
|
this.tabShow = false; |
|
|
|
}else{ |
|
|
|
response.data.roles.forEach(res=>{ |
|
|
|
if(res.roleKey == 'personal_user' || res.roleKey == 'company_user'){ |
|
|
|
this.tabShow = false; |
|
|
|
}else{ |
|
|
|
this.tabShow = true; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
// v-if="tabShow" |
|
|
|
// getUserProfile().then(response => { |
|
|
|
// if (response.data.roles.length < 1){ |
|
|
|
// this.tabShow = false; |
|
|
|
// }else{ |
|
|
|
// response.data.roles.forEach(res=>{ |
|
|
|
// if(res.roleKey == 'personal_user' || res.roleKey == 'company_user'){ |
|
|
|
// this.tabShow = false; |
|
|
|
// }else{ |
|
|
|
// this.tabShow = true; |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|