|
|
|
@ -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() { |
|
|
|
|