JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_开发录音组件,替换老组件功能

This commit is contained in:
田岩
2026-03-05 09:01:12 +08:00
parent 015af519fb
commit c1e7d0de47
3 changed files with 20 additions and 21 deletions
+2 -2
View File
@@ -2,10 +2,10 @@
ENV = 'development'
# '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:7002'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
# DEV
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
+2 -2
View File
@@ -8,8 +8,8 @@ const IsAndEnv = getPhoneEnvBool('AND')
// const url = '/traapp/asrAiModelSocket/open';
const url = '/traapp/asrAiModelSocket/open';
const _baseUrl = get_base_url(url).split('http').join('ws');
// export const wsUrl = _baseUrl + url + '?summary=' + getToken();
export const wsUrl = 'ws://10.10.10.8:8000/ws/asr';
export const wsUrl = _baseUrl + url + '?summary=' + getToken();
// export const wsUrl = 'ws://10.10.10.8:8000/ws/asr';
const windowInfo = uni.getWindowInfo();
// 安全区域信息
const safeArea = windowInfo.safeArea;
+16 -17
View File
@@ -127,10 +127,15 @@
const voice_to_text_status = ref<VoiceToTextSubStatus>('init');
const popupRef = ref(null);
const props = defineProps({
isDisabled: {
default: false,
type: Boolean
},
isDisabled: {
default: false,
type: Boolean
},
// 禁用时候点击反馈的文本
disabledText: {
default: '请稍后再试!',
type: String
},
isLoading: {
default: false,
type: Boolean
@@ -139,15 +144,12 @@
default: '发送回答中,请稍后再试!',
type: String
},
// 禁用时候点击反馈的文本
disabledText: {
default: '请稍后再试!',
type: String
},
// 设置为true则不能发送消息
canAnswer: {
default: true,
default: false,
type: Boolean
},
// 不能发送消息的提示
canAnswerText: {
default: '当前状态不能发送内容!',
type: String
@@ -156,11 +158,6 @@
type: Number,
default: 500
},
minRecordDuration: {
// 最小录音间隔
type: Number,
default: 1000
},
adjustPosition:{
default: true,
type: Boolean
@@ -174,6 +171,7 @@
}
}
});
// 兼容以前的按钮参数
const workMode = computed<WorkModeType>(() => {
const modeMap = {
'01': 'both',
@@ -241,6 +239,7 @@
// 开启语音
const startRecord = async (obj: { touches: any[] }) => {
if (props.isDisabled) return;
if (props.canAnswer) return common.msg(props.canAnswerText)
try {
const state = await permissionApi.judgeIosPermission('record');
if (state === 'not determined') {
@@ -471,7 +470,7 @@
console.log('禁用时点击给的提示');
if (props.isDisabled) common.msg(props.disabledText);
};
const send_msg = () => {
if (!isInputVisible.value) {
emit('submitAnswer', inputText.value, changeBtn);
@@ -480,7 +479,7 @@
closePopup();
}
};
setupKeyboardHeightListener((height: number) => {
const _height = Math.max(height - 100, 0);
pageBoxMarginBottom.value = `${_height}px`;