diff --git a/littleApp_child/pages/Setting/Setting.js b/littleApp_child/pages/Setting/Setting.js index b51b2aa..04ae8ee 100644 --- a/littleApp_child/pages/Setting/Setting.js +++ b/littleApp_child/pages/Setting/Setting.js @@ -110,7 +110,7 @@ Page({ wx.setStorageSync('userId', '') getApp().globalData.token = '' getApp().globalData.userId = '' - that.toLogin() + wx.navigateBack({}) } }, fail: function (res) { diff --git a/littleApp_child/pages/home/home.js b/littleApp_child/pages/home/home.js index 13d7d21..b3b61a6 100644 --- a/littleApp_child/pages/home/home.js +++ b/littleApp_child/pages/home/home.js @@ -78,6 +78,9 @@ Page({ this.getUserInfo() this.homePage() } + if (!app.globalData.token) { + this.welcomePage() + } }, onUnload: function () { // 移除监听