From c1e7d0de478b32eaa2d4ddbc889b29da75ea6cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Thu, 5 Mar 2026 09:01:12 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5F=E5=BC=80=E5=8F=91=E5=BD=95=E9=9F=B3=E7=BB=84?= =?UTF-8?q?=E4=BB=B6,=E6=9B=BF=E6=8D=A2=E8=80=81=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- src/components/touch-btn/touch-btn.ts | 4 ++-- src/components/touch-btn/touch-btn.vue | 33 +++++++++++++------------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.env.development b/.env.development index eed6c970..bc2a8d2a 100644 --- a/.env.development +++ b/.env.development @@ -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' diff --git a/src/components/touch-btn/touch-btn.ts b/src/components/touch-btn/touch-btn.ts index 86b73420..3f1a2911 100644 --- a/src/components/touch-btn/touch-btn.ts +++ b/src/components/touch-btn/touch-btn.ts @@ -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; diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue index 597ab9c0..bc2e08cc 100644 --- a/src/components/touch-btn/touch-btn.vue +++ b/src/components/touch-btn/touch-btn.vue @@ -127,10 +127,15 @@ const voice_to_text_status = ref('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(() => { 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`;