|
@@ -28,15 +28,7 @@ Page({
|
|
|
categoryList: [],
|
|
|
bannerList: []
|
|
|
},
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面加载
|
|
|
- */
|
|
|
- onShow() {
|
|
|
- if (typeof this.getTabBar === 'function') {
|
|
|
- this.getTabBar().setData({
|
|
|
- selected: 0
|
|
|
- })
|
|
|
- }
|
|
|
+ onLoad() {
|
|
|
this.getLocUserInfo()
|
|
|
if (Object.keys(this.data.userInfo).length > 0) {
|
|
|
this.requestAgain()
|
|
@@ -61,6 +53,13 @@ Page({
|
|
|
}, 6000)
|
|
|
}
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ if (typeof this.getTabBar === 'function') {
|
|
|
+ this.getTabBar().setData({
|
|
|
+ selected: 0
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
onUnload() {
|
|
|
this.storeBindings.destroyStoreBindings()
|
|
|
},
|