|
|
|
@ -1,4 +1,3 @@ |
|
|
|
const event = require('../../utils/event') |
|
|
|
const app = getApp() |
|
|
|
|
|
|
|
Component({ |
|
|
|
@ -59,13 +58,6 @@ Component({ |
|
|
|
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80), |
|
|
|
Custom: app.globalData.Custom |
|
|
|
}) |
|
|
|
} else { |
|
|
|
event.on('InitMessage', this, this.onEvent) |
|
|
|
} |
|
|
|
}, |
|
|
|
detached: function(){ |
|
|
|
if(!app.globalData.Custom){ |
|
|
|
event.remove('InitMessage', this) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -80,17 +72,8 @@ Component({ |
|
|
|
} |
|
|
|
wx.navigateBack() |
|
|
|
}, |
|
|
|
onEvent: function(message){ |
|
|
|
if (message.what == 8) { |
|
|
|
this.setData({ |
|
|
|
StatusBar: app.globalData.StatusBar || 40, |
|
|
|
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80), |
|
|
|
Custom: app.globalData.Custom |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
toHome() { |
|
|
|
if (app.globalData.userInfo.userId) { |
|
|
|
if (app.globalData.userInfo && app.globalData.userInfo.userId) { |
|
|
|
wx.redirectTo({ url: '/pages/index/index' }) |
|
|
|
} else { |
|
|
|
wx.reLaunch({ url: '/pages/login/index' }) |
|
|
|
|