From 6fc22a22b2685ed7340489ddbfe11ecdfd6f0d62 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 30 Mar 2023 09:44:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/sections/console/containers/index.js | 10 +++------- .../client/src/sections/console/containers/setUp.js | 4 ---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/console/client/src/sections/console/containers/index.js b/console/client/src/sections/console/containers/index.js index a7cf558..36821c2 100644 --- a/console/client/src/sections/console/containers/index.js +++ b/console/client/src/sections/console/containers/index.js @@ -63,7 +63,6 @@ function Index (props) { const mainColor = "rgb(249,179,45)" if (type == 'xy') { // xy 视图 - console.log(xyCvs, xyCvs.current, canvasHeight); const xyCtx = xyCvs.current.getContext("2d"); xyCvs.current.height = canvasHeight xyCvs.current.width = canvasWidth @@ -434,13 +433,12 @@ function Index (props) { dispatch(getCrane()) // - - ws = new WebSocket(`ws://10.8.30.183:4100/${ApiTable.dataLive}`); //建立websocket连接 + const root = window.FS_API_ROOT + ws = new WebSocket(`${root.replace('http', 'ws')}/${ApiTable.dataLive}`); //建立websocket连接 ws.onopen = function (e) { - console.log("websocket 连接成功"); interval = setInterval(() => { // console.log("发送心跳保持长连接不超时断开"); - this.send(JSON.stringify({ "act": "ma_get_active_devices" })); + this.send(JSON.stringify({ "act": "long_live" })); }, 20000);//20秒一次 } ws.onerror = e => { @@ -448,7 +446,6 @@ function Index (props) { } ws.onmessage = evt => { let msg = JSON.parse(evt.data); - console.log(msg); if (msg) { setCraneParams(msg) @@ -464,7 +461,6 @@ function Index (props) { } } }, []) - console.log(darkColor, darkModde ? darkColor.textColor : 'auto'); const cardStyle = { boxShadow: `0 0 10px ${darkModde ? darkColor.shadow : 'rgba(0, 0, 0, 0.2)'}`, diff --git a/console/client/src/sections/console/containers/setUp.js b/console/client/src/sections/console/containers/setUp.js index 3aed1ca..0b25f10 100644 --- a/console/client/src/sections/console/containers/setUp.js +++ b/console/client/src/sections/console/containers/setUp.js @@ -211,10 +211,7 @@ function SetUp ({ dispatch }) { click: () => { if (formIndex == 1) { const values = form.getFieldsValue() - console.log(values); dispatch(editCrane(values)).then(res => { - console.log(res - ); if (res.success) { message.success('修改配置信息成功') } else { @@ -247,7 +244,6 @@ function SetUp ({ dispatch }) { } function mapStateToProps (state) { - console.log(state); const { auth } = state; return {