Fix(AI):[#4049]语音播放AI回复内容,点击[重新生成],语音仍在播放
This commit is contained in:
@@ -170,6 +170,7 @@ export default {
|
||||
url: '/aiChat/views/history' + paramsStr
|
||||
})
|
||||
}
|
||||
this.$emit('enterHistory')
|
||||
this.closeLayer()
|
||||
},
|
||||
closeLayer() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -296,6 +296,7 @@
|
||||
ref="historyView"
|
||||
:status-bar-height="statusBarHeight"
|
||||
form-module="history"
|
||||
@enter-history="audioStopHandle"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -442,6 +442,7 @@
|
||||
<AiHistoryList
|
||||
ref="historyView"
|
||||
:status-bar-height="statusBarHeight"
|
||||
@enter-history="audioStopHandle"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user