|
|
@ -187,11 +187,12 @@ |
|
|
}, false, true).then((res) => { |
|
|
}, false, true).then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
// 授权成功后的处理逻辑 |
|
|
// 授权成功后的处理逻辑 |
|
|
this.tui.toast('获取手机号成功'+res.result); |
|
|
this.tui.toast('获取手机号成功'+res.result.mobile); |
|
|
|
|
|
|
|
|
// 如果后端返回了 phone,将其存入缓存,方便以后使用 |
|
|
// 如果后端返回了 phone,将其存入缓存,方便以后使用 |
|
|
if (res.result) { |
|
|
if (res.result) { |
|
|
uni.setStorageSync('mobile', res.result); |
|
|
uni.setStorageSync("hiver_token", res.result.accessToken) |
|
|
|
|
|
uni.setStorageSync('mobile', res.result.mobile); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message || '获取失败'); |
|
|
this.tui.toast(res.message || '获取失败'); |
|
|
|