diff --git a/pages/home/index.vue b/pages/home/index.vue index d95a298..6e9b3ea 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -428,8 +428,12 @@ import request,{host} from '@/common/request' params:{companyId:this.$store.getters.userInfo.companyId} }) if(res.statu){ - this.plantBase=[res.data] - this.$store.commit("setBaseId", {id:res.data[0].id,name:res.data[0].baseName}) + if(res.data.length>0){ + this.plantBase=[res.data] + this.$store.commit("setBaseId", {id:res.data[0].id,name:res.data[0].baseName}) + }else{ + uni.showToast({title:"请在管理端维护基地!",icon:"none"}) + } }else{ uni.showModal({ title:"提示",