try{
const authorize = await wx.authorize({scope: 'scope.userInfo'})
console.log(authorize,'authorize');
}catch(e){
console.log(e);
}
预期表现:
- 同意授权:
- 拒绝授权:
- 拒绝后再次调用authorize:
- 授权信息为空:(见于用户刚进入时调用wx.getUserInfo)
- 无效的scope:(scope列表中没有这个值)
try{
const authorize = await wx.authorize({scope: 'scope.userInfo'})
console.log(authorize,'authorize');
}catch(e){
console.log(e);
}
预期表现: