先暂时将绑定手机登录的移除
This commit is contained in:
@ -63,13 +63,13 @@ export async function snsapiBaseAuthorize() {
|
||||
const res: IUserInfoVo = await wxSnsapiBaseLogin({code})
|
||||
console.log("登录成功 ~ snsapiBaseAuthorize ~ res:", res)
|
||||
useUserStore().setUserInfo(res)
|
||||
if (!res.mobile) {
|
||||
// 如果没有绑定手机号的话需要去绑定手机号
|
||||
toast.info('请先绑定手机号')
|
||||
router.navigateTo('/pages/login/mobile', 500)
|
||||
} else {
|
||||
// if (!res.mobile) {
|
||||
// // 如果没有绑定手机号的话需要去绑定手机号
|
||||
// toast.info('请先绑定手机号')
|
||||
// router.navigateTo('/pages/login/mobile', 500)
|
||||
// } else {
|
||||
uni.$emit('loginSuccess')
|
||||
}
|
||||
// }
|
||||
} catch (err) {
|
||||
uni.setStorageSync('wechatCode', 0)
|
||||
console.log('请求失败', err)
|
||||
|
||||
@ -76,11 +76,11 @@ const alovaInstance = createAlova({
|
||||
throw new Error('[请求错误]:未登录')
|
||||
}
|
||||
|
||||
if (!mobile) {
|
||||
toast.info('请先绑定手机号')
|
||||
router.navigateTo('/pages/login/mobile', 500)
|
||||
throw new Error('[请求错误]:未绑定手机号')
|
||||
}
|
||||
// if (!mobile) {
|
||||
// toast.info('请先绑定手机号')
|
||||
// router.navigateTo('/pages/login/mobile', 500)
|
||||
// throw new Error('[请求错误]:未绑定手机号')
|
||||
// }
|
||||
|
||||
method.config.headers.token = token;
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@
|
||||
const code = getUrlCode().code // 截取code
|
||||
const userStore = useUserStore()
|
||||
console.log("🚀 ~ userStore:", userStore.userInfo)
|
||||
if (userStore.userInfo.mobile) {
|
||||
if (userStore.userInfo) {
|
||||
userInfo.value = userStore.userInfo
|
||||
isLogin.value = true
|
||||
|
||||
@ -257,7 +257,7 @@
|
||||
// 刷新用户信息
|
||||
console.log("🚀 ~ 刷新用户信息:")
|
||||
const userStore = useUserStore()
|
||||
if (userStore.userInfo.mobile) {
|
||||
if (userStore.userInfo) {
|
||||
userInfo.value = userStore.userInfo
|
||||
isLogin.value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user