Fix(AI):[#3949]语音播放AI回复内容,返回AI主页、小程序首页,语音仍在播放
This commit is contained in:
@@ -77,9 +77,11 @@ export const chatMixins = {
|
||||
}.bind(this)).exec()
|
||||
},
|
||||
onUnload() {
|
||||
if (this.audioContext) {
|
||||
this.audioContext.stop()
|
||||
}
|
||||
wx.getBackgroundAudioManager().stop()
|
||||
this.closeWsFn()
|
||||
// console.log('在页面卸载时取消监听')
|
||||
// wx.offKeyboardHeightChange()
|
||||
},
|
||||
created() {
|
||||
const _this = this
|
||||
|
||||
@@ -97,6 +97,20 @@
|
||||
/>
|
||||
重新生成
|
||||
</view>
|
||||
<view
|
||||
:class="{
|
||||
'playing': audioPlayId === item.conversationId && isPlayAudio
|
||||
}"
|
||||
class="item"
|
||||
@click="ttsHandle(item)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/' + ((audioPlayId === item.conversationId && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
语音播放
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -491,9 +491,6 @@ export default {
|
||||
this.createNewHandle()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
},
|
||||
methods: {
|
||||
createdCallbak() {
|
||||
this.$nextTick(() => {
|
||||
@@ -541,6 +538,10 @@ export default {
|
||||
},
|
||||
// 创建新会话
|
||||
createNewHandle() {
|
||||
if (this.audioContext) {
|
||||
this.audioContext.stop()
|
||||
}
|
||||
wx.getBackgroundAudioManager().stop()
|
||||
if (!this.chatNumber) return
|
||||
this.closeWsFn()
|
||||
this.chatNumber = ''
|
||||
|
||||
Reference in New Issue
Block a user