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