Browse Source

案件入口判断

wulanhaote
庞东旭 3 years ago
parent
commit
21257372b1
1 changed files with 15 additions and 14 deletions
  1. +15
    -14
      src/components/common/law_footer.vue

+ 15
- 14
src/components/common/law_footer.vue View File

@@ -4,7 +4,7 @@
<van-tabbar route :placeholder="true" > <van-tabbar route :placeholder="true" >
<van-tabbar-item replace to="/lawEnforcement" icon="wap-home-o">首页</van-tabbar-item> <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/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-item replace to="/lawEnforcement/user" icon="contact">我的</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
@@ -20,19 +20,20 @@ export default {
}; };
}, },
created() { 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: { methods: {




Loading…
Cancel
Save