JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_fix: bug

This commit is contained in:
杨航
2026-01-19 11:38:07 +08:00
parent f887bf181c
commit aeca71bcbe
2 changed files with 9 additions and 4 deletions
@@ -6,7 +6,7 @@
</view>
<view class="qns-desc">你的答案</view>
<view class="ans-list">
<esQuestionAnswer v-for="item in dataInfo.analyContentVos" :dataInfo="item" :intrctWay="item.ossKey?'02':'01'"
<esQuestionAnswer v-for="item in dataInfo.analyContentVos" :dataInfo="{...item, ossAddr: 'http://25.18.122.91:9786' + item.ossAddr?.slice(35,)}" :intrctWay="item.ossKey?'02':'01'"
:activeVoiceId="activeVoiceId" @changePlay="changePlay" />
</view>
<slot></slot>
@@ -136,10 +136,11 @@
emit('buutton_click', type, props.dataInfo);
};
const pauseVoice = () => {
console.log('pauseVoice')
if (!talkVoiceObj.value) return;
talkVoiceObj.value.pause();
isPlaying.value = false;
emit('changePlay', '');
// emit('changePlay', '');
};
const playVoice = () => {
emit('changePlay', unref(dataInfo)?.ossAddr);
@@ -161,22 +162,26 @@
talkVoiceObj.value = uni.createInnerAudioContext();
let prevTime = -1;
talkVoiceObj.value.onEnded(() => {
console.log('onEnded')
emit('changePlay', '');
prevTime = -1;
talkVoiceObj.value.src = '';
});
talkVoiceObj.value.onStop(() => {
console.log('onEnded')
emit('changePlay', '');
prevTime = -1;
talkVoiceObj.value.src = '';
});
talkVoiceObj.value.onPause(() => {
console.log('onEnded')
prevTime = talkVoiceObj.value.currentTime;
emit('changePlay', '');
});
talkVoiceObj.value.onError(() => {
prevTime = -1;
emit('changePlay', '');
console.log('onError')
// prevTime = -1;
// emit('changePlay', '');
});
talkVoiceObj.value.onPlay(() => {
prevTime = talkVoiceObj.value.currentTime;