diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 9afeaab4..9a40eb77 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -129,18 +129,21 @@ onMounted(async ()=>{ }) } }else{ - // let _recordPerm = permission.judgeIosPermission('record') - // if(!_recordPerm){ - // common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?',true, '取消','确定').then((res) => { - // if(res) { - // // 去开启权限 - // permission.gotoAppPermissionSetting() - // }else{ - // // 取消 - // common.navigateBack() - // } - // }) - // } + let _recordPerm = uni.getAppAuthorizeSetting() + let _state = _recordPerm.microphoneAuthorized + if(_state === 'denied'){ + common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?',true, '取消','确定').then((res) => { + if(res) { + // 去开启权限 + permission.gotoAppPermissionSetting() + }else{ + // 取消 + common.navigateBack() + } + }) + }else if(_state === 'not determined'){ + startRecord() + } } // #endif })