Browse Source

--优化登陆时4个页面检测引起的重复调取baseInfo--

featrue/v4.2
huziyuan 5 years ago
parent
commit
cac9949d25
3 changed files with 5 additions and 3 deletions
  1. 3
      pages/agent/index/index.js
  2. 4
      pages/home/tab1/index.js
  3. 1
      pages/index/index.js

3
pages/agent/index/index.js

@ -48,8 +48,9 @@ Page({
})
this.fetchRegionList()
this.fetchPapersList()
event.on('attentionPaperList', this, this.onEvent)
event.on('factoryDetails', this, this.onEvent)
event.on('attentionPaperList', this, this.onEvent)
},
onEvent: function (message) {
if (message.what == 1100 || message.what == 1101) {

4
pages/home/tab1/index.js

@ -20,7 +20,6 @@ Page({
*/
onLoad: function (options) {
this.getUerInfoFct()
},
toNextTab: function () {
wx.navigateTo({
@ -149,5 +148,6 @@ Page({
}
})
}
},
})

1
pages/index/index.js

@ -57,6 +57,7 @@ Page({
},
/************************************** 初始化流程 ********************************************/
onLoad: function (options) {
storage.put('isTokenHaveStatus', false)
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调

Loading…
Cancel
Save