Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
杨航
2026-03-12 09:56:04 +08:00
5 changed files with 33 additions and 6 deletions
-1
View File
@@ -7,7 +7,6 @@ ENV = 'development'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# DEV # DEV
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' #VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
@@ -241,6 +241,9 @@
background-color: #06f; background-color: #06f;
border-radius: 32rpx; border-radius: 32rpx;
transition: width 0.3s ease; transition: width 0.3s ease;
z-index: 10;
// 滑动到离开变红 // 滑动到离开变红
&.is-out { &.is-out {
background-color: #ff3e49; background-color: #ff3e49;
@@ -265,6 +268,10 @@
visibility: visible; visibility: visible;
pointer-events: auto; pointer-events: auto;
user-select: auto; user-select: auto;
z-index: 20rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
} }
&::after { &::after {
content: ''; content: '';
@@ -276,6 +283,7 @@
position: absolute; position: absolute;
bottom: -22rpx; bottom: -22rpx;
left: 50%; left: 50%;
z-index: -1;
margin-left: -22rpx; margin-left: -22rpx;
transition: left 0.3s ease-out; // 时长0.3秒,ease-out缓动(结束时变慢,更自然) transition: left 0.3s ease-out; // 时长0.3秒,ease-out缓动(结束时变慢,更自然)
} }
@@ -288,6 +296,7 @@
// 输入框默认并不可见 // 输入框默认并不可见
.textarea { .textarea {
visibility: hidden; visibility: hidden;
} }
&.failed,&.networkError { &.failed,&.networkError {
width: 506rpx; width: 506rpx;
+9 -2
View File
@@ -33,6 +33,7 @@
</view> </view>
</view> </view>
<uni-popup ref="popupRef" class="popup" @touchmove.stop.prevent="false"> <uni-popup ref="popupRef" class="popup" @touchmove.stop.prevent="false">
<view class="overlay-box"> <view class="overlay-box">
<view class="fl1"></view> <view class="fl1"></view>
<view class="talk-dialog-box"> <view class="talk-dialog-box">
@@ -45,12 +46,14 @@
v-model="textAreaText" v-model="textAreaText"
:maxlength="props.maxlength" :maxlength="props.maxlength"
@click.stop @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" text-style="color: #fff"
border="none" border="none"
placeholderStyle="color:#999999;font-size:26rpx;"
placeholder="" placeholder=""
:autoHeight="true"
></uv-textarea> ></uv-textarea>
<!-- autoHeight -->
<view class="error-tip-div"> <view class="error-tip-div">
<image :src="TouchBtnImages.iconRecognizeErrorSvg()" mode="aspectFill" class="img"></image> <image :src="TouchBtnImages.iconRecognizeErrorSvg()" mode="aspectFill" class="img"></image>
<view class="" v-if="voice_to_text_status === 'failed'">未识别到文字</view> <view class="" v-if="voice_to_text_status === 'failed'">未识别到文字</view>
@@ -206,6 +209,7 @@
} }
}); });
const dialogDynamicClasses = computed(() => { const dialogDynamicClasses = computed(() => {
const classes = []; const classes = [];
isOutStatus.value === '02' && classes.push('is-out'); isOutStatus.value === '02' && classes.push('is-out');
(isOutStatus.value === '03' || status.value === 'voice_to_text' || status.value === 'send_over') && (isOutStatus.value === '03' || status.value === 'voice_to_text' || status.value === 'send_over') &&
@@ -213,7 +217,9 @@
// 仅语音模式,01松手后要和03操作一样 // 仅语音模式,01松手后要和03操作一样
// isOutStatus.value === '01' && workMode.value === 'text-only' && status.value == 'voice_to_text' && classes.push('is-translate'); // 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); voice_to_text_status.value !== '' && classes.push(voice_to_text_status.value);
return classes; return classes;
// return ['is-translate','success' ];
}); });
const recordId = ref(''); const recordId = ref('');
const allText = ref(''); const allText = ref('');
@@ -374,6 +380,7 @@
ossKey.value = controlBody?.ossKey || ''; ossKey.value = controlBody?.ossKey || '';
if (typeof controlBody?.txt === 'string') { if (typeof controlBody?.txt === 'string') {
allText.value = controlBody.txt.trim(); allText.value = controlBody.txt.trim();
tempText.value = ''
} }
const _isOutStatus = const _isOutStatus =
workMode.value === 'text-only' && isOutStatus.value === '01' workMode.value === 'text-only' && isOutStatus.value === '01'
@@ -1,3 +0,0 @@
export function startAudioRecord(callback) {}
export function stopAudioRecord() {}
export function preRequestRecordPermission() {}
@@ -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() {}