fix: bug
This commit is contained in:
@@ -277,7 +277,7 @@
|
||||
const activeNum = ref(1);
|
||||
const hasPermission = ref(false)
|
||||
|
||||
const getRecordPermission = (obj) => {
|
||||
const getRecordPermission = async (obj) => {
|
||||
if (isDisabled.value) return;
|
||||
if (isTalking.value) {
|
||||
common.msg('操作频繁,请稍后重试!');
|
||||
@@ -286,8 +286,9 @@
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
//#ifdef APP-PLUS
|
||||
if(!hasPermission.value){
|
||||
let _res = getPermission()
|
||||
let _res = await getPermission()
|
||||
if (_res) {
|
||||
hasPermission.value = true
|
||||
showOverlayTalking(obj);
|
||||
@@ -295,6 +296,7 @@
|
||||
}else{
|
||||
showOverlayTalking(obj);
|
||||
}
|
||||
// #endif
|
||||
};
|
||||
const getPermission = async () => {
|
||||
//#ifdef APP-PLUS
|
||||
@@ -341,9 +343,9 @@
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
//#ifndef APP-PLUS
|
||||
return true
|
||||
// #endif
|
||||
// //#ifndef APP-PLUS
|
||||
// return true
|
||||
// // #endif
|
||||
}
|
||||
const isMoving = ref(false);
|
||||
const isTalking = ref(false);
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
const activeNum = ref(1);
|
||||
const hasPermission = ref(false)
|
||||
|
||||
const getRecordPermission = (obj) => {
|
||||
const getRecordPermission = async (obj) => {
|
||||
if (isDisabled.value) return;
|
||||
if (isTalking.value) {
|
||||
common.msg('操作频繁,请稍后重试!');
|
||||
@@ -226,8 +226,9 @@
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
if (!hasPermission.value) {
|
||||
let _res = getPermission()
|
||||
let _res = await getPermission()
|
||||
if (_res) {
|
||||
hasPermission.value = true
|
||||
showOverlayTalking(obj);
|
||||
@@ -235,9 +236,10 @@
|
||||
} else {
|
||||
showOverlayTalking(obj);
|
||||
}
|
||||
// #endif
|
||||
};
|
||||
const getPermission = async () => {
|
||||
//#ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS
|
||||
// 安卓端
|
||||
if (IsAndEnv) {
|
||||
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
|
||||
@@ -281,9 +283,9 @@
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
//#ifndef APP-PLUS
|
||||
return true
|
||||
// #endif
|
||||
// //#ifndef APP-PLUS
|
||||
// return true
|
||||
// // #endif
|
||||
}
|
||||
const isMoving = ref(false);
|
||||
const isTalking = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user