Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
bbd5b0bb3b
1 changed files with 1 additions and 18 deletions
  1. 19
      colorui/components/cu-custom.js

19
colorui/components/cu-custom.js

@ -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' })

Loading…
Cancel
Save