wx.openSetting({}) 在catch中无效?

发布于 6 年前作者 jingzou1787 次浏览最后编辑 6 年前来自 issues
// bindtap 事件
getCurrentLocation(){
    wx.getSetting({
      success:(res)=>{
        if (!res.authSetting['scope.userLocation']) {
          wx.authorize({
            scope:'scope.userLocation',
            success:()=>{
              this.getLocation()
            },
            fail:(e)=>{
              console.log("authorize e",e)
              wx.openSetting() //如果拒绝了权限申请,这里无法唤起设置面板
            }
          })
        }else{
          this.getLocation()
        }
      }
    })
    
  },
1 回复
mingxue
mingxue1 楼4 年前