diff --git a/pages/index/index.vue b/pages/index/index.vue index 7ad14a7..c8072f4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -76,6 +76,8 @@ // 否则请求仍带旧 accessToken,后端“会话优先”会把上一个账号的数据返回给这位用户 account.clearAccountCache() uni.setStorageSync('phone', res.data.mobile) + // xuchao: 后端已为云闪付入口签发会员会话,存下 accessToken,后续接口才认得这个用户 + if (res.data.accessToken) uni.setStorageSync('token', res.data.accessToken) this.$u.api.getEligibility({ phone: res.data.mobile, identityNo: res.data.idNo || '', name: res.data.name || '' }).then(eRes => { if (eRes.errcode === 0) { uni.setStorageSync('isAuth', eRes.data.isAuth)