From 6712cc844dc3e9db20aa7a21fce031e518ba7d68 Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Tue, 15 Jul 2025 09:37:01 +0800 Subject: [PATCH] =?UTF-8?q?Fix(AI):[#4049]=E8=AF=AD=E9=9F=B3=E6=92=AD?= =?UTF-8?q?=E6=94=BEAI=E5=9B=9E=E5=A4=8D=E5=86=85=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB[=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90]?= =?UTF-8?q?=EF=BC=8C=E8=AF=AD=E9=9F=B3=E4=BB=8D=E5=9C=A8=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aiChat/components/historyList.vue | 1 + aiChat/mixins/chatMixins.js | 9 +++++++++ aiChat/views/history.vue | 1 + aiChat/views/index.vue | 1 + 4 files changed, 12 insertions(+) diff --git a/aiChat/components/historyList.vue b/aiChat/components/historyList.vue index 32b9187..7cf5e6a 100644 --- a/aiChat/components/historyList.vue +++ b/aiChat/components/historyList.vue @@ -170,6 +170,7 @@ export default { url: '/aiChat/views/history' + paramsStr }) } + this.$emit('enterHistory') this.closeLayer() }, closeLayer() { diff --git a/aiChat/mixins/chatMixins.js b/aiChat/mixins/chatMixins.js index 65fbb36..daf7ea9 100644 --- a/aiChat/mixins/chatMixins.js +++ b/aiChat/mixins/chatMixins.js @@ -152,6 +152,7 @@ export const chatMixins = { }, // 重新生成 regenerateHandle(item) { + this.audioStopHandle() deleteChatItemByConversationId(item.conversationId).then(res => { const { success } = res if (success) { @@ -411,6 +412,14 @@ export const chatMixins = { console.log('send failed (' + err.code + ')') } }, + audioStopHandle() { + // Fix bug#4049 + this.audioAyy = [] + if (this.audioContext) { + this.audioContext.stop() + } + this.isPlayAudio = false + }, ttsHandle(item) { this.audioAyy = [] if (this.audioContext) { diff --git a/aiChat/views/history.vue b/aiChat/views/history.vue index 750eb26..d0b7c7a 100644 --- a/aiChat/views/history.vue +++ b/aiChat/views/history.vue @@ -296,6 +296,7 @@ ref="historyView" :status-bar-height="statusBarHeight" form-module="history" + @enter-history="audioStopHandle" /> diff --git a/aiChat/views/index.vue b/aiChat/views/index.vue index 8d1b9e2..19b0fca 100644 --- a/aiChat/views/index.vue +++ b/aiChat/views/index.vue @@ -442,6 +442,7 @@