想请教一下,这个错误怎么修改?then of undefined
onLoad: function (options) { this.get_record_auth() }, get_record_auth(){ var that=this; wx.getSetting().then(res=>{ if(res.authSetting['scope.record']){ that.setData({authed:true}) } else{ wx.authorize({ scope: 'scope.record', }).then(res=>{ that.setData({authed:true}) }).catch(err=>{ that.cancel_auth() }) } }) }, cancel_auth(){ var that=this; wx.showModal({ title:'提示', content:'未授权无法录音哦!', concelText:'不授权', confirmText:'去授权', success:res=>{ if(res.confirm){ wx.openSetting({ success(res){ if(res.authSetting['scope.record']){ that.setData({authed:true}) } } } ) } } }) } [图片]