fix: bug

This commit is contained in:
杨航
2025-11-24 15:52:47 +08:00
parent e1f17a2b79
commit 4ec664cafe
+11
View File
@@ -165,9 +165,14 @@
const IsAndEnv = getPhoneEnvBool('AND');
const isStartNum = ref(0);
const isStopNum = ref(0);
const isGettingPermission = ref(false)
const initRecord = () => {
recordObjCom.value = uni.getRecorderManager();
unref(recordObjCom)?.onStop((res, duration) => {
if(isGettingPermission.value){
isGettingPermission.value = false
return
}
audioPath.value = res.tempFilePath;
if (!isOut.value) {
if (startFlag.value !== 2) {
@@ -299,10 +304,13 @@
if (_recordPerm !== 1) {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
isGettingPermission.value = true
hideOverlayTalking()
// 去开启权限
permission.gotoAppPermissionSetting();
} else {
// 取消
hideOverlayTalking()
common.navigateBack();
}
});
@@ -316,10 +324,13 @@
if (_state === 'denied') {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
isGettingPermission.value = true
hideOverlayTalking()
// 去开启权限
uni.openAppAuthorizeSetting();
} else {
// 取消
hideOverlayTalking()
common.navigateBack();
}
});