一、遇到的问题
调用wx.openSetting未调起小程序设置界面
二、最终使用的方案
解决后有一个问题,小程序设置页面同意授权后,快速返回页面点击开始录制按钮,小程序设置未生效期间,按钮无法点击;这种延迟暂时忽略吧
<view class="cm2 f1s n" bind:tap="startFun">开始录制</view>
.method("startFun",function(e){wx.getSetting({success: (res) => {//摄像头权限let authCamera = res.authSetting['scope.camera']//麦克风录音权限let authRecord = res.authSetting['scope.record']if(authCamera === false || authRecord === false){//有一个拒绝授权,需要跳转到微信授权页面wx.openSetting({success: (ress) => {console.log('3设置页面', ress)if(ress.authSetting['scope.camera'] === false || ress