wx.chooseAddress().then(res => {
cnsole.log("授权成功!")
}).catch(()=> {
wx.getSetting().then(res => {
if (!res.authSetting['scope.address']) {
wx.showModal({
title: '是否授权通讯地址',
content: '请确认授权,否则无法获取微信地址',
success: function (tip) {
if (tip.confirm) {
wx.openSetting()
}
}
})
}
})
})
微信小程序授权被拒绝后再次授权
最新推荐文章于 2024-04-25 00:52:41 发布