const handUserLogo = (e: any) => {
// if(e.detail.errMsg === 'getPhoneNumber:ok'){
let phoneCode: any = e.detail.code
uni.showNavigationBarLoading()
uni.login({
timeout: 6000,
success: (loginRes: any) => {
console.log('success:login方法返回的值:', loginRes)
if (loginRes.code) {
// 登录成功
uni.getUserInfo({
provider: 'weixin',
success: (info: any) => {
// 获取用户信息成功, info.authResult保存用户信息
const {
avatarUrl,
nickName
} = info.userInfo
// userStore.setAvatarUrl(avatarUrl);
// userStore.setNickName(nickName);
//调用接口
userApi.getTokenCode(loginRes.code)
}
})
}
},
fail(err) {
console.log('fail:login方法返回错误:', err)
}
})
}
以下是莫名的错误:
MiniProgramError
Cannot read properties of undefined (reading 'errno')
TypeError: Cannot read properties of undefined (reading 'errno')
at Function.success (WAServiceMainContext.js:1:1597373)
at <api openBusinessView success callback function>
at (WAServiceMainContext.js:1:154335)
at $c (WAServiceMainContext.js:1:718912)
at t.call.then.t._complete_hook.jc.name (WAServiceMainContext.js:1:720503)

不晓得为什么,用微信绑定的手机号就么有问题。拉起另外一个号码就出现这个问题。
这个提示,和手机号登录没有关系吧