瀏覽代碼

案件入口判断

wulanhaote
庞东旭 3 年之前
父節點
當前提交
21257372b1
共有 1 個檔案被更改,包括 15 行新增14 行删除
  1. +15
    -14
      src/components/common/law_footer.vue

+ 15
- 14
src/components/common/law_footer.vue 查看文件

@@ -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: {



Loading…
取消
儲存