clickLocationBtn(){ wx.authorize({ scope: 'scope.userLocation' , success() { the.getLocation(); }, fail() { wx.openSetting({ success(res) { console.log(res) }, fail(res) { console.log(res) } }) } }); }, |
建议拒绝授权的时候 再弹出个弹窗 showModal。点击确定调用 wx.openSetting()
https://developers.weixin.qq.com/community/develop/doc/000cea2305cc5047af5733de751008