Преглед изворни кода

案件入口判断

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…
Откажи
Сачувај