From c32db48d10bc20d02512af32ab4e1dc1c17fb881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Thu, 12 Mar 2026 08:35:42 +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=E4=BF=AE=E6=94=B9=E5=BD=95=E9=9F=B3=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 - src/components/touch-btn/style/popup.scss | 9 +++++++++ src/components/touch-btn/touch-btn.vue | 11 +++++++++-- src/uni_modules/ty-recording/utssdk/web/index.js | 3 --- src/uni_modules/ty-recording/utssdk/web/index.uts | 15 +++++++++++++++ 5 files changed, 33 insertions(+), 6 deletions(-) delete mode 100644 src/uni_modules/ty-recording/utssdk/web/index.js create mode 100644 src/uni_modules/ty-recording/utssdk/web/index.uts diff --git a/.env.development b/.env.development index f620d0e7..bc2a8d2a 100644 --- a/.env.development +++ b/.env.development @@ -7,7 +7,6 @@ ENV = 'development' 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/style/popup.scss b/src/components/touch-btn/style/popup.scss index 759b10ec..ccdcd7fe 100644 --- a/src/components/touch-btn/style/popup.scss +++ b/src/components/touch-btn/style/popup.scss @@ -241,6 +241,9 @@ background-color: #06f; border-radius: 32rpx; transition: width 0.3s ease; + z-index: 10; + + // 滑动到离开变红 &.is-out { background-color: #ff3e49; @@ -265,6 +268,10 @@ visibility: visible; pointer-events: auto; user-select: auto; + z-index: 20rpx; + + padding-top: 10rpx; + padding-bottom: 10rpx; } &::after { content: ''; @@ -276,6 +283,7 @@ position: absolute; bottom: -22rpx; left: 50%; + z-index: -1; margin-left: -22rpx; transition: left 0.3s ease-out; // 时长0.3秒,ease-out缓动(结束时变慢,更自然) } @@ -288,6 +296,7 @@ // 输入框默认并不可见 .textarea { visibility: hidden; + } &.failed,&.networkError { width: 506rpx; diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue index e32c5558..a24034ca 100644 --- a/src/components/touch-btn/touch-btn.vue +++ b/src/components/touch-btn/touch-btn.vue @@ -33,6 +33,7 @@ + @@ -45,12 +46,14 @@ v-model="textAreaText" :maxlength="props.maxlength" @click.stop - customStyle="background: #ffffff00; padding-bottom: 50rpx; color: #fff; caret-color: #fff" + customStyle=" background: #ffffff00;color: #fff; caret-color: #fff" text-style="color: #fff" border="none" - placeholderStyle="color:#999999;font-size:26rpx;" placeholder="" + :autoHeight="true" + > + 未识别到文字 @@ -206,6 +209,7 @@ } }); const dialogDynamicClasses = computed(() => { + const classes = []; isOutStatus.value === '02' && classes.push('is-out'); (isOutStatus.value === '03' || status.value === 'voice_to_text' || status.value === 'send_over') && @@ -213,7 +217,9 @@ // 仅语音模式,01松手后要和03操作一样 // isOutStatus.value === '01' && workMode.value === 'text-only' && status.value == 'voice_to_text' && classes.push('is-translate'); voice_to_text_status.value !== '' && classes.push(voice_to_text_status.value); + return classes; + // return ['is-translate','success' ]; }); const recordId = ref(''); const allText = ref(''); @@ -374,6 +380,7 @@ ossKey.value = controlBody?.ossKey || ''; if (typeof controlBody?.txt === 'string') { allText.value = controlBody.txt.trim(); + tempText.value = '' } const _isOutStatus = workMode.value === 'text-only' && isOutStatus.value === '01' diff --git a/src/uni_modules/ty-recording/utssdk/web/index.js b/src/uni_modules/ty-recording/utssdk/web/index.js deleted file mode 100644 index cc58d82b..00000000 --- a/src/uni_modules/ty-recording/utssdk/web/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export function startAudioRecord(callback) {} -export function stopAudioRecord() {} -export function preRequestRecordPermission() {} \ No newline at end of file diff --git a/src/uni_modules/ty-recording/utssdk/web/index.uts b/src/uni_modules/ty-recording/utssdk/web/index.uts new file mode 100644 index 00000000..47f97e5f --- /dev/null +++ b/src/uni_modules/ty-recording/utssdk/web/index.uts @@ -0,0 +1,15 @@ + +export function startAudioRecord(options: StartAudioRecordOptions): void { + setTimeout(() => { + const recordStartTime = new Date().getTime(); + // 1. 生成录音唯一标识(UUID,方便多录音实例管理) + const recordId = `${new Date().getTime()}_${Math.floor(Math.random() * 10000)}`; + options.onStart?.({ + recordId: recordId, // 唯一标识 + sampleRate: 16000.0, // 采样率 + startTime: recordStartTime, // 启动时间戳 + }); + }, 100) +} +export function stopAudioRecord() {} +export function preRequestRecordPermission() {} \ No newline at end of file