Fix(AI):[#4049]语音播放AI回复内容,点击[重新生成],语音仍在播放
This commit is contained in:
@@ -170,6 +170,7 @@ export default {
|
|||||||
url: '/aiChat/views/history' + paramsStr
|
url: '/aiChat/views/history' + paramsStr
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.$emit('enterHistory')
|
||||||
this.closeLayer()
|
this.closeLayer()
|
||||||
},
|
},
|
||||||
closeLayer() {
|
closeLayer() {
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ export const chatMixins = {
|
|||||||
},
|
},
|
||||||
// 重新生成
|
// 重新生成
|
||||||
regenerateHandle(item) {
|
regenerateHandle(item) {
|
||||||
|
this.audioStopHandle()
|
||||||
deleteChatItemByConversationId(item.conversationId).then(res => {
|
deleteChatItemByConversationId(item.conversationId).then(res => {
|
||||||
const { success } = res
|
const { success } = res
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -411,6 +412,14 @@ export const chatMixins = {
|
|||||||
console.log('send failed (' + err.code + ')')
|
console.log('send failed (' + err.code + ')')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
audioStopHandle() {
|
||||||
|
// Fix bug#4049
|
||||||
|
this.audioAyy = []
|
||||||
|
if (this.audioContext) {
|
||||||
|
this.audioContext.stop()
|
||||||
|
}
|
||||||
|
this.isPlayAudio = false
|
||||||
|
},
|
||||||
ttsHandle(item) {
|
ttsHandle(item) {
|
||||||
this.audioAyy = []
|
this.audioAyy = []
|
||||||
if (this.audioContext) {
|
if (this.audioContext) {
|
||||||
|
|||||||
@@ -296,6 +296,7 @@
|
|||||||
ref="historyView"
|
ref="historyView"
|
||||||
:status-bar-height="statusBarHeight"
|
:status-bar-height="statusBarHeight"
|
||||||
form-module="history"
|
form-module="history"
|
||||||
|
@enter-history="audioStopHandle"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -442,6 +442,7 @@
|
|||||||
<AiHistoryList
|
<AiHistoryList
|
||||||
ref="historyView"
|
ref="historyView"
|
||||||
:status-bar-height="statusBarHeight"
|
:status-bar-height="statusBarHeight"
|
||||||
|
@enter-history="audioStopHandle"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user