|
|
@ -67,6 +67,7 @@ App({ |
|
|
this.globalData.fragmentHeight = windowHeight - statusBarHeight |
|
|
this.globalData.fragmentHeight = windowHeight - statusBarHeight |
|
|
this.globalData.safeFragmentHeight = windowHeight - statusBarHeight - this.globalData.safeBottom |
|
|
this.globalData.safeFragmentHeight = windowHeight - statusBarHeight - this.globalData.safeBottom |
|
|
this.globalData.windowWidth = e.windowWidth |
|
|
this.globalData.windowWidth = e.windowWidth |
|
|
|
|
|
this.resumeIndex() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -78,5 +79,15 @@ App({ |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
return false |
|
|
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() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |