修复:AI问答模块

This commit is contained in:
2025-07-09 13:47:01 +08:00
parent 6b36f83861
commit a88377bf32
6 changed files with 77 additions and 116 deletions

View File

@@ -37,10 +37,12 @@ export class WebSocketManager {
};
this.ws.onmessage = (event) => {
console.log(event,'event>>>')
try {
if(event.data !== '连接成功'){
const data = JSON.parse(event.data);
console.log(data,'data>>>')
this.onMessageCallback?.(data);
}
} catch (error) {
console.error('解析WebSocket消息失败:', error);
}