Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
6bebde6463
2 changed files with 14 additions and 3 deletions
  1. 11
      app.js
  2. 6
      pages/index/index.js

11
app.js

@ -67,6 +67,7 @@ App({
this.globalData.fragmentHeight = windowHeight - statusBarHeight
this.globalData.safeFragmentHeight = windowHeight - statusBarHeight - this.globalData.safeBottom
this.globalData.windowWidth = e.windowWidth
this.resumeIndex()
}
})
},
@ -78,5 +79,15 @@ App({
return true
}
return false
},
resumeIndex: function(){
wx.onAppRoute(function (res) {
let pages = getCurrentPages()
let page = pages[pages.length - 1]
if(page && page.onResume && !page.data.inited ){
page.onResume()
}
})
}
})

6
pages/index/index.js

@ -220,9 +220,9 @@ Page({
}
},
onEvent: function (message) {
if(message.what == 250){
this.setData({ pageIndex: 0 })
}
// if(message.what == 250){
// this.setData({ pageIndex: 0 })
// }
},
stopTouchMove: function (e) {
return false

Loading…
Cancel
Save