拒绝授权后重新请求,不弹框

发布于 7 年前作者 qma1313 次浏览最后编辑 7 年前来自 ask

wx.getSetting({

success(res) {

console.log(res)

if (!res.authSetting[‘scope.writePhotosAlbum’]) {//没有授权

wx.authorize({

scope: ‘scope.writePhotosAlbum’,

success() {

console.log(‘======’)

},

fail(error){

console.log(error)

}

})

}

}

})

我写了授权,但一直弹出框,真机和模拟器都试过了。

errMsg:authorize:fail auth deny

返回告诉我这个失败。

2 回复
rlei
rlei1 楼6 年前

openSetting的话,不管你受没授权 都会跳到那个页面 然后还得退回来,不合理啊!什么正解啊!

taoyong
taoyong2 楼5 年前

openSetting