wx.getSetting({
success: (res) => {
if (!res.authSetting['scope.userInfo']) {
wx.authorize({
scope: 'scope.userInfo',
success: () => {
// 同意授权
},
fail: (res) => {
// 无法唤醒设置
wx.openSetting()
}
})
} else {
// 已经授权了
}
},
fail: (res) => {
console.log(res);
}
})
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
里面写入 scope.writePhotosAlbum 就可以调用权限
写入 scope.userInfo 调不出来
想实现刚进入小程序 获取用户权限