【问下】wx.openSetting()?
wx.getSetting({
success: (res) => {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success: () => {
// 同意授权
},
fail: (res) => {
// 无法唤醒设置
wx.openSetting()
}
})
} else {
// 已经授权了
}
},
fail: (res) => {
console.log(res);
}
})
3 回复
setTimeout(function() {
wx.openSetting({
success(res) {
console.log(res.authSetting)
}
})
}, 1000)
这种也是不支持的
尝试过可以。需要用户点击后判断。查看代码片段:
https://developers.weixin.qq.com/community/develop/article/doc/000ac686c5c5506f18b87ee825b013