From bbd5b0bb3b617a7b25eb24409d9a809308c4bf47 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Tue, 12 Oct 2021 16:35:45 +0800 Subject: [PATCH] no message --- colorui/components/cu-custom.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/colorui/components/cu-custom.js b/colorui/components/cu-custom.js index 3187a2b..7ce0dad 100644 --- a/colorui/components/cu-custom.js +++ b/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' })