From 4e2225d73eeba296e8617ec3fedf5c5d0310698e Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Wed, 11 Jun 2025 13:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=B5=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 ++-- package.json | 2 +- src/App.tsx | 2 +- src/components/Header.tsx | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 4b28872..2bbd71a 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -REACT_APP_WS_URL=192.168.1.115:8080/ws -# REACT_APP_WS_URL=127.1.1.0:8080/ws \ No newline at end of file +# REACT_APP_WS_URL=192.168.1.115:8080/ws +REACT_APP_WS_URL=127.1.1.0:8080/ws \ No newline at end of file diff --git a/package.json b/package.json index e1f52a2..8f85e35 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "outline", "version": "0.1.0", "private": true, - "proxy": "http://192.168.1.115:8080", + "proxy": "http://127.0.0.1:8080", "dependencies": { "@ant-design/icons": "^6.0.0", "@babel/core": "^7.16.0", diff --git a/src/App.tsx b/src/App.tsx index e3e661d..2e0f113 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -38,7 +38,7 @@ function App() { } else if (data.messageType === "STATE" && data.path === "/api/subdevice/uartchanel/get-channel-state") { dispatch(updateDeviceState(data.data)); } else if (data.messageType === "STATE" && data.path === "/api/profiler-state/get-state") { - // console.log(data.data); + console.log('updateDevice===',data.data); dispatch(updateDevice(data.data)); }else if(data.path === "/get-task-progress"){ let syncData = data.data; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index a59775c..3a892e1 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -73,6 +73,7 @@ export default function Header() { if(deviceInfo.flag === 1){ setPowerColor('bluetooth-battery-green') } + setPower(deviceInfo.power.toFixed()) }, [deviceInfo.power]) //同步科天健基础数据