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 @@