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]) //同步科天健基础数据