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