From a0cbe8219f94043656b96db6998f4c89cc8e96f7 Mon Sep 17 00:00:00 2001 From: zhangz Date: Tue, 9 Dec 2025 14:52:19 +0800 Subject: [PATCH] 修改websocket的test消息; --- src/mes/indexMes/index.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js index 9f838fb..c0168b5 100644 --- a/src/mes/indexMes/index.js +++ b/src/mes/indexMes/index.js @@ -334,7 +334,7 @@ const useIndexMesEvent = props => { [currentContent, sModelsId, sModelType] ); - const { webSocket: ws } = props.app; + const { webSocket: ws, userinfo } = props.app; const { url } = ws || {}; const wsRef = useRef(ws); useEffect(() => { @@ -354,15 +354,7 @@ const useIndexMesEvent = props => { return; } if (wsRef.current.readyState !== WebSocket.OPEN) return; - const message = { - connectTest: 'test', - key: 'test', - flag: 'test', - msg: 'test', - sId: 'test', - showType: 'test', - sendFrom: props.app.userinfo.sId, - }; + const message = { flag: "connectTest", sId: "test", sendFrom: userinfo.sId }; wsRef.current.send(JSON.stringify(message)); window.wsTimer = setTimeout(() => { console.log("================未收到Test返回消息,webSocket重新连接======================"); -- libgit2 0.22.2