From 30a2a9ade1e797e736e6bbc9128c0f7fee5fa1e4 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Tue, 25 Apr 2023 14:58:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=9F=BA=E5=9C=B0=E5=88=97=E8=A1=A8=E6=97=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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:"提示",