JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_修改录音组件样式bug
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="popupRef" class="popup" @touchmove.stop.prevent="false">
|
||||
|
||||
<view class="overlay-box">
|
||||
<view class="fl1"></view>
|
||||
<view class="talk-dialog-box">
|
||||
@@ -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"
|
||||
|
||||
></uv-textarea>
|
||||
<!-- autoHeight -->
|
||||
<view class="error-tip-div">
|
||||
<image :src="TouchBtnImages.iconRecognizeErrorSvg()" mode="aspectFill" class="img"></image>
|
||||
<view class="" v-if="voice_to_text_status === 'failed'">未识别到文字</view>
|
||||
@@ -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'
|
||||
|
||||
@@ -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() {}
|
||||
Reference in New Issue
Block a user