JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_修复兼容性问题2

This commit is contained in:
田岩
2025-12-25 16:52:48 +08:00
4 changed files with 20 additions and 7 deletions
+2
View File
@@ -7,10 +7,12 @@ ENV = 'development'
VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
+1 -1
View File
@@ -99,7 +99,7 @@ export const commonUploadVoiceFile = (file, url, data = {}, fileKey = 'voice') =
} else if (res.rtnCode === '0004') {
return reject('N');
}
return reject('Other');
return reject(res);
} catch (error) {
reject(error);
}
+16 -5
View File
@@ -164,13 +164,13 @@
// 录音
const audioPath = ref('');
const audioObj = uni.createInnerAudioContext();
const isGettingPermission = ref(false)
//#ifdef APP-PLUS
// app端
const recordObjCom = ref({});
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) => {
@@ -302,6 +302,7 @@
const getRecordPermission = async (obj) => {
if (isDisabled.value) return;
//#ifdef APP-PLUS
if (isTalking.value) {
common.msg('操作频繁,请稍后重试!');
setTimeout(() => {
@@ -309,7 +310,6 @@
}, 500);
return;
}
//#ifdef APP-PLUS
if (!hasPermission.value) {
let _res = await getPermission()
if (_res) {
@@ -326,6 +326,9 @@
showOverlayTalking(obj);
}
// #endif
//#ifdef H5
showOverlayTalking(obj);
// #endif
};
const getPermission = async () => {
//#ifdef APP-PLUS
@@ -380,7 +383,9 @@
const showOverlayTalking = (obj) => {
if (showTalkingModel.value) return;
if (isGettingPermission.value) {
//#ifdef APP-PLUS
stopRecord()
// #endif
isGettingPermission.value = false
return
}
@@ -416,6 +421,9 @@
// canStart.value = false
startRecord();
// #endif
//#ifdef H5
showTalkingModel.value = true
// #endif
setTimeout(() => {
if (_recnum === recNum.value) {
hideOverlayTalking(recNum.value);
@@ -436,15 +444,18 @@
//#ifdef APP-PLUS
stopRecord();
// #endif
//#ifdef H5
showTalkingModel.value = false
// #endif
};
const handleMove = (obj) => {
if (isMoving.value) {
touchX.value = obj.changedTouches[0].pageX;
touchY.value = obj.changedTouches[0].pageY;
if (outScreen.value) {
hideOverlayTalking(obj);
}
// if (outScreen.value) {
// hideOverlayTalking(obj);
// }
}
};
// 发送文本
+1 -1
View File
@@ -213,7 +213,7 @@ const uploadRecordNow = (voicePath, voiceTime) => {
answerIsOver.value = true
talkingList.value.pop()
uni.showToast({
title: '系统异常,请联系管理员',
title: err?.message || '网络异常,请联系管理员',
icon: 'none',
duration: 1000
})