集成websocket

This commit is contained in:
wangxulei
2025-01-10 16:06:30 +08:00
parent f2348ef1f5
commit 1b92d4371d
6 changed files with 15 additions and 30 deletions

View File

@@ -47,6 +47,7 @@ class WebSocketManager {
console.log('WebSocket连接关闭');
this.isConnected = false;
this.onCloseCallback && this.onCloseCallback(event);
this.reconnect(url);
};
this.webSocketInstance.onopen = () => {
console.log("WebSocket连接成功");