注释跳转到权限页面3
This commit is contained in:
@@ -94,7 +94,11 @@ const initRecord = () => {
|
||||
})
|
||||
unref(recordObjCom).onStart(() => {
|
||||
console.log('开始录音了');
|
||||
showTalkingModel.value = true
|
||||
let _recordPerm = uni.getAppAuthorizeSetting()
|
||||
let _state = _recordPerm.microphoneAuthorized
|
||||
if(_state === 'authorized'){
|
||||
showTalkingModel.value = true
|
||||
}
|
||||
})
|
||||
}
|
||||
const startRecord = () => {
|
||||
@@ -136,13 +140,16 @@ onMounted(async ()=>{
|
||||
if(res) {
|
||||
// 去开启权限
|
||||
permission.gotoAppPermissionSetting()
|
||||
uni.openAppAuthorizeSetting({
|
||||
|
||||
})
|
||||
}else{
|
||||
// 取消
|
||||
common.navigateBack()
|
||||
}
|
||||
})
|
||||
}else if(_state === 'not determined'){
|
||||
startRecord()
|
||||
// startRecord()
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
Reference in New Issue
Block a user