代码更新

This commit is contained in:
GaoHao
2025-03-04 18:30:16 +08:00
parent fd0c452a76
commit 4f65b08c06
32 changed files with 622 additions and 1616 deletions

View File

@@ -39,15 +39,15 @@ class WebsocketUtil {
// 连接成功后启动心跳和消息监听
this.startHeartbeat();
this.listenForMessages();
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
this.socketTask.onClose((result) => {
this.isOpen = false;
// if( this.isOpen ){
this.reconnect();
// }
});
});
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
this.socketTask.onClose((result) => {
this.isOpen = false;
// if( this.isOpen ){
this.reconnect();
// }
});
}