From b8471b004b6ae006039e1165489ef99cab750b45 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Thu, 6 Apr 2023 15:38:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E5=9C=B0=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index.vue | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/pages/home/index.vue b/pages/home/index.vue index b3e24c6..7950e0b 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -367,15 +367,14 @@ import request,{host} from '@/common/request' } }, onLoad() { - // uni.setTabBarItem({ - // index:0, - // pagePath:"/pages/home/rePassword" - // }) this.getHeadImg() if(this.isAdmin){ this.getPlantBase() }else{ - this.getBaseName(this.$store.getters['userInfo'].plantBaseInfoId) + this.$store.commit("setBaseId", { + id: this.$store.getters['userInfo'].plantBaseInfoId, + name: this.$store.getters['userInfo'].plantBaseInfoName + }) } this.$provise.on("updateMassif", this.getMassif) this.$provise.on("updateStock", this.getStock) @@ -438,20 +437,20 @@ import request,{host} from '@/common/request' } }, //获取基地名称 - async getBaseName(plantBaseInfoId){ - var res=await request("/api/purchase/purchaseUserShow",{ - params:{plantBaseInfoId} - }) - if(res.statu){ - this.$store.commit("setBaseId", {id:plantBaseInfoId,name:res.data.baseName}) - }else{ - uni.showModal({ - title:"提示", - content:res.msg||"获取基地名称失败!", - showCancel:false, - }) - } - }, + // async getBaseName(plantBaseInfoId){ + // var res=await request("/api/purchase/purchaseUserShow",{ + // params:{plantBaseInfoId} + // }) + // if(res.statu){ + // this.$store.commit("setBaseId", {id:plantBaseInfoId,name:res.data.baseName}) + // }else{ + // uni.showModal({ + // title:"提示", + // content:res.msg||"获取基地名称失败!", + // showCancel:false, + // }) + // } + // }, async getBaseInfo(){ if(this.$store.state.baseInfo.id){ var res=await request("/api/plantIndex/queryFarmWorkAndInput",{