Fix(AI):[#3611]一个用户在问答过程中退了,然后又进入重新生成一个会话,需要关闭ws

This commit is contained in:
lifizer
2025-04-08 10:47:31 +08:00
parent 689d949315
commit 794e405ed2
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -67,6 +67,9 @@ export const chatMixins = {
} }
}.bind(this)).exec() }.bind(this)).exec()
}, },
onUnload() {
this.closeWsFn()
},
created() { created() {
const _this = this const _this = this
uni.getSystemInfo({ uni.getSystemInfo({
+1
View File
@@ -264,6 +264,7 @@ export default {
// 创建新会话 // 创建新会话
createNewHandle() { createNewHandle() {
if (!this.chatNumber) return if (!this.chatNumber) return
this.closeWsFn()
this.chatNumber = '' this.chatNumber = ''
this.showCursor = false this.showCursor = false
this.loading = false this.loading = false