【问下】wx.openSetting()?
发布于 6 年前 作者 juanzeng 8120 次浏览 来自 问答
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)

这种也是不支持的

回到顶部