JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_修复兼容性问题2
This commit is contained in:
@@ -7,10 +7,12 @@ ENV = 'development'
|
|||||||
VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
|
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:7001'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
# 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://192.168.247.200'
|
||||||
# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
|
# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
|
||||||
|
|||||||
+1
-1
@@ -99,7 +99,7 @@ export const commonUploadVoiceFile = (file, url, data = {}, fileKey = 'voice') =
|
|||||||
} else if (res.rtnCode === '0004') {
|
} else if (res.rtnCode === '0004') {
|
||||||
return reject('N');
|
return reject('N');
|
||||||
}
|
}
|
||||||
return reject('Other');
|
return reject(res);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,13 +164,13 @@
|
|||||||
// 录音
|
// 录音
|
||||||
const audioPath = ref('');
|
const audioPath = ref('');
|
||||||
const audioObj = uni.createInnerAudioContext();
|
const audioObj = uni.createInnerAudioContext();
|
||||||
|
const isGettingPermission = ref(false)
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
// app端
|
// app端
|
||||||
const recordObjCom = ref({});
|
const recordObjCom = ref({});
|
||||||
const IsAndEnv = getPhoneEnvBool('AND');
|
const IsAndEnv = getPhoneEnvBool('AND');
|
||||||
const isStartNum = ref(0);
|
const isStartNum = ref(0);
|
||||||
const isStopNum = ref(0);
|
const isStopNum = ref(0);
|
||||||
const isGettingPermission = ref(false)
|
|
||||||
const initRecord = () => {
|
const initRecord = () => {
|
||||||
recordObjCom.value = uni.getRecorderManager();
|
recordObjCom.value = uni.getRecorderManager();
|
||||||
unref(recordObjCom)?.onStop((res, duration) => {
|
unref(recordObjCom)?.onStop((res, duration) => {
|
||||||
@@ -302,6 +302,7 @@
|
|||||||
|
|
||||||
const getRecordPermission = async (obj) => {
|
const getRecordPermission = async (obj) => {
|
||||||
if (isDisabled.value) return;
|
if (isDisabled.value) return;
|
||||||
|
//#ifdef APP-PLUS
|
||||||
if (isTalking.value) {
|
if (isTalking.value) {
|
||||||
common.msg('操作频繁,请稍后重试!');
|
common.msg('操作频繁,请稍后重试!');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -309,7 +310,6 @@
|
|||||||
}, 500);
|
}, 500);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//#ifdef APP-PLUS
|
|
||||||
if (!hasPermission.value) {
|
if (!hasPermission.value) {
|
||||||
let _res = await getPermission()
|
let _res = await getPermission()
|
||||||
if (_res) {
|
if (_res) {
|
||||||
@@ -326,6 +326,9 @@
|
|||||||
showOverlayTalking(obj);
|
showOverlayTalking(obj);
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
//#ifdef H5
|
||||||
|
showOverlayTalking(obj);
|
||||||
|
// #endif
|
||||||
};
|
};
|
||||||
const getPermission = async () => {
|
const getPermission = async () => {
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
@@ -380,7 +383,9 @@
|
|||||||
const showOverlayTalking = (obj) => {
|
const showOverlayTalking = (obj) => {
|
||||||
if (showTalkingModel.value) return;
|
if (showTalkingModel.value) return;
|
||||||
if (isGettingPermission.value) {
|
if (isGettingPermission.value) {
|
||||||
|
//#ifdef APP-PLUS
|
||||||
stopRecord()
|
stopRecord()
|
||||||
|
// #endif
|
||||||
isGettingPermission.value = false
|
isGettingPermission.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -416,6 +421,9 @@
|
|||||||
// canStart.value = false
|
// canStart.value = false
|
||||||
startRecord();
|
startRecord();
|
||||||
// #endif
|
// #endif
|
||||||
|
//#ifdef H5
|
||||||
|
showTalkingModel.value = true
|
||||||
|
// #endif
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (_recnum === recNum.value) {
|
if (_recnum === recNum.value) {
|
||||||
hideOverlayTalking(recNum.value);
|
hideOverlayTalking(recNum.value);
|
||||||
@@ -436,15 +444,18 @@
|
|||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
stopRecord();
|
stopRecord();
|
||||||
// #endif
|
// #endif
|
||||||
|
//#ifdef H5
|
||||||
|
showTalkingModel.value = false
|
||||||
|
// #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMove = (obj) => {
|
const handleMove = (obj) => {
|
||||||
if (isMoving.value) {
|
if (isMoving.value) {
|
||||||
touchX.value = obj.changedTouches[0].pageX;
|
touchX.value = obj.changedTouches[0].pageX;
|
||||||
touchY.value = obj.changedTouches[0].pageY;
|
touchY.value = obj.changedTouches[0].pageY;
|
||||||
if (outScreen.value) {
|
// if (outScreen.value) {
|
||||||
hideOverlayTalking(obj);
|
// hideOverlayTalking(obj);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 发送文本
|
// 发送文本
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ const uploadRecordNow = (voicePath, voiceTime) => {
|
|||||||
answerIsOver.value = true
|
answerIsOver.value = true
|
||||||
talkingList.value.pop()
|
talkingList.value.pop()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '系统异常,请联系管理员',
|
title: err?.message || '网络异常,请联系管理员',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user