From 8a4d482469e2078cce3cf227c11be862e94b860d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 12 四月 2024 20:25:24 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-flow/src/pages/map/index.jsx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index d2a22fa..7c039da 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -107,7 +107,7 @@
             websocket = new WebSocketClient('/ws/map/websocket');
             websocket.connect();
             websocket.onMessage = (data) => {
-                Utils.updateMapStatusInRealTime(data, () => curFloorRef.current);
+                Utils.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite);
             }
 
             const handleResize = () => {
@@ -131,6 +131,13 @@
             }, 200)
         }
         initialize();
+
+        return () => {
+            websocket.onMessage = (data) => {}
+            if (websocket) {
+                websocket.close();
+            }
+        }
     }, []);
 
     // resize

--
Gitblit v1.9.1