diff --git a/.env b/.env index fbd905e..7d3aae3 100644 --- a/.env +++ b/.env @@ -1,2 +1 @@ -REACT_APP_WS_URL=127.1.1.0:8080/ws -PORT= 3000 \ No newline at end of file +REACT_APP_WS_URL=192.168.1.127:8080/ws \ No newline at end of file diff --git a/.gitignore b/.gitignore index b6ae733..1823b26 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* *.zip + +.idea +package-lock.json diff --git a/package-lock.json b/package-lock.json index 60c600a..ec2b1fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,6 +48,7 @@ "jest": "^27.4.3", "jest-resolve": "^27.4.2", "jest-watch-typeahead": "^1.0.0", + "konva": "^8.3.5", "mini-css-extract-plugin": "^2.4.5", "postcss-flexbugs-fixes": "^5.0.2", "postcss-loader": "^6.2.1", @@ -12277,8 +12278,7 @@ "url": "https://github.com/sponsors/lavrton" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/language-subtag-registry": { "version": "0.3.23", diff --git a/package.json b/package.json index 15bb757..ce1a638 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "outline", "version": "0.1.0", "private": true, - "proxy": "http://127.1.1.0:8080", + "proxy": "http://192.168.1.127:8080", "dependencies": { "@ant-design/icons": "^6.0.0", "@babel/core": "^7.16.0", diff --git a/src/App.tsx b/src/App.tsx index 0eaa4dc..e3e661d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import "./App.scss"; -import { Outlet, useNavigate, useLocation } from "react-router"; +import { Outlet, useNavigate } from "react-router"; import { Layout, ConfigProvider, message} from "antd"; import { default as AppHeader } from "./components/Header"; import { default as AppFooter } from "./components/Footer"; @@ -17,15 +17,13 @@ import SyncData from "./components/syncData"; import { sysSet } from "./services/user/system"; import { updateSystemAccountState, updateSystemAllState, updateSystemOrgState } from "./store/system/systemSlice"; import { system } from "./types"; -import Home from "./home"; const { Header, Footer, Sider, Content } = Layout; function App() { const dispatch = useAppDispatch(); const navigate = useNavigate(); - const location = useLocation(); - const isRootRoute = location.pathname === '/'; + useEffect(() => { //连接websocket const wsClient = createWebSocket(sharedWsUrl); @@ -75,7 +73,7 @@ function App() { },[]) useEffect(() => { - + if (localStorage.getItem("user")) { // navigate("/measure/action", { replace: true }); } else { @@ -92,7 +90,7 @@ function App() { }) } - + const querySystemInfo = () => { sysSet({}, "GET").then(res=>{ if(res.status === 0 && res.data && res.data.length){ @@ -106,7 +104,7 @@ function App() { dispatch(updateSystemAccountState(item)) } }) - + } }) } @@ -141,7 +139,6 @@ function App() { - {/* {isRootRoute && } */}