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