diff --git a/pages/index/index.js b/pages/index/index.js index a8fb1d4..f3f8024 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -49,6 +49,7 @@ Page({ remindMsg:[],//调拨盘点弹框 levelStIndex:0, levelSt:[],//客户等级 + isResetbiz:false,//是否重置过BIZID isShowVersionInfo:false,//是否显示版本更新 versionInfo:{ number:'V3.0.28', @@ -78,6 +79,9 @@ Page({ if(this.data.biz_id){ this.putAppUserResetbiz() }else{ + this.setData({ + isResetbiz:true, + }); this.getUserInfo() } @@ -101,17 +105,22 @@ Page({ }, onShow: function () { - this.setData({ - remindTab:[], - remindMsg:[], - isShowReport:false,//是否显示调拨盘点弹框 - isShowGoods:false, - }); - this.getAppUserCal() + this.getHoursTip() - this.getAppTransferRemind() - this.getAppInventoryRemind() - this.getAppGoodsRemind() + + //确保bizID重置完成再执行 + if(this.data.isResetbiz){ + this.setData({ + remindTab:[], + remindMsg:[], + isShowReport:false,//是否显示调拨盘点弹框 + isShowGoods:false, + }); + this.getAppUserCal() + this.getAppTransferRemind() + this.getAppInventoryRemind() + this.getAppGoodsRemind() + } }, @@ -143,8 +152,14 @@ Page({ let params = {}; params['biz_id'] = this.data.biz_id; _.apiQuery.putAppUserResetbiz(params).then(res => { + this.setData({ + isResetbiz:true, + }); this.getUserInfo() this.getAppUserCal() + this.getAppTransferRemind() + this.getAppInventoryRemind() + this.getAppGoodsRemind() }); }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 3d70a83..0a3354c 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -3,7 +3,7 @@ - +