From 129855f7cd2f65b921544b15f4748d4048be76ad Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 14 十月 2024 15:16:41 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/MapPage.jsx | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zy-acs-flow/src/map/MapPage.jsx b/zy-acs-flow/src/map/MapPage.jsx index b34c92c..4b35c2f 100644 --- a/zy-acs-flow/src/map/MapPage.jsx +++ b/zy-acs-flow/src/map/MapPage.jsx @@ -80,20 +80,20 @@ Tool.setThemeMode(themeMode); Http.setNotify(notify); Http.setMapContainer(player.mapContainer); - // websocket = new WebSocketClient('/ws/map/websocket'); + websocket = new WebSocketClient('/ws/map/websocket'); await Http.fetchMapData(); + websocket.connect(); + websocket.onMessage = (data) => { + console.log("ws", data); + + // Tool.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite); + } setTimeout(() => { player.adaptScreen(); notify.info(translate('page.map.welcome')); }, 200) - - // websocket.connect(); - // websocket.onMessage = (data) => { - // Tool.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite); - // } - } initialize(); -- Gitblit v1.9.1