diff --git a/manifest.json b/manifest.json index bc205e8..258d91b 100644 --- a/manifest.json +++ b/manifest.json @@ -50,7 +50,7 @@ /* 快应用特有相关 */ "mp-weixin" : { /* 小程序特有相关 */ - "appid" : "wxf733c344d8e69a99", + "appid" : "wx93ec514a5c456507", "setting" : { "urlCheck" : false }, diff --git a/pages/index/index.vue b/pages/index/index.vue index b26a285..86a7c17 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -44,7 +44,7 @@ }, onLoad() { this.getSwiperList(); - // this.checkLogin() + this.checkLogin() }, onShow() { this.page= "home" diff --git a/subpkg/login/login.vue b/subpkg/login/login.vue index a458e6a..810f333 100644 --- a/subpkg/login/login.vue +++ b/subpkg/login/login.vue @@ -51,10 +51,14 @@ } const { data: loginResult } = await uni.$http.post('/small/wechat/login', query) - if (loginResult.meta.status !== 200) return uni.$showMsg('登录失败!') + + if (loginResult.token === "") return uni.$showMsg('登录失败!') // 直接把 token 保存到 vuex 中 - this.updateToken(loginResult.data) + this.updateToken(loginResult.token) + uni.switchTab({ + url: '/pages/index/index' + }) //this.navigateBack() }, navigateBack() {