注释跳转到权限页面3

This commit is contained in:
2025-07-18 15:19:02 +08:00
parent de20bf250a
commit 911fe2f4ee
+9 -2
View File
@@ -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