在调用uni.login()进行一键登录的时候,获取不到信息,显示res.authResult为undefined。我也开通一键登录了,也为这个应用开通了,也开启了一键登录模块
代码如下:
uni.login({
provider: 'univerify',
univerifyStyle: { // 自定义登录框样式
//参考`univerifyStyle 数据结构`
},
success(res){ // 登录成功
console.log(res.authResult); // {openid:'登录授权唯一标识',access_token:'接口返回的 token'}
},
fail(res){ // 登录失败
console.log(res.errCode)
console.log(res.errMsg)
}
})