调起录音
弹出授权窗口
点击拒绝
使用wx.getSetting,wx.authorize进行二次授权,按钮点击无反应
没有任何报错信息。
代码逻辑如下:
wx.getSetting({
success(settings) {
console.log(‘获取授权信息:’, settings)
if (settings && !settings.authSetting[‘scope.record’]) {
wx.authorize({
scope: ‘scope.record’,
success() {
RecorderManager = wx.getRecorderManager()
backgroundAudioManager.title = ‘录制我的跨年演讲’
backgroundAudioManager.src = `${ResourcesBaseUrl}MTU0NDY5NDUyMjgw.mp3`
that.RecorderManagerWatch()
},
fail() {
console.log(‘询问失败’)
wx.openSetting({
success(open) {
if (!open.authSetting[‘scope.record’]) return false
}
})
}
})
} else {
RecorderManager = wx.getRecorderManager()
backgroundAudioManager.title = ‘录制我的跨年演讲’
backgroundAudioManager.src = `${ResourcesBaseUrl}MTU0NDY5NDUyMjgw.mp3`
that.RecorderManagerWatch()
}
}
})