diff --git a/.env b/.env index 23a129f..7bf881d 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -REACT_APP_WS_URL=192.168.1.201/ws +REACT_APP_WS_URL=localhost:3005 diff --git a/package.json b/package.json index 8c3432a..89bc545 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "outline", "version": "0.1.0", "private": true, - "proxy":"http://localhost:3001", + "proxy":"http://localhost:3005", "dependencies": { "@babel/core": "^7.16.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", diff --git a/src/components/Header.tsx b/src/components/Header.tsx index ce70651..419fa52 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -6,7 +6,7 @@ import icon_logout from "../assets/icon_logout.svg"; import check_mark from "../assets/check_mark.svg"; import icon_pwd from "../assets/icon_pwd.svg"; import { useState } from "react"; -import { bluetoothList, bluetoothInfo } from '../mock/recordList' +// import { bluetoothList, bluetoothInfo } from '../mock/recordList' import { Dropdown, MenuProps, message, Button, Popover } from "antd"; import { logout } from "../services/user/user"; import "./bluetooth.scss"; @@ -55,13 +55,14 @@ export default function Header() { }, ]; + let [bluetoothList, setbluetoothList] = useState([]) const getBtList = () => { let Dom = null if(isConnect === 0){ Dom =
{bluetoothList.map(item => { return
- + {/* */}
})}
@@ -82,8 +83,8 @@ export default function Header() {
设备已连接
-
型号:{bluetoothInfo.type}
-
电量:{bluetoothInfo.power}
+ {/*
型号:{bluetoothInfo.type}
+
电量:{bluetoothInfo.power}
*/}
diff --git a/src/pages/measure/components/MeasureDetail.tsx b/src/pages/measure/components/MeasureDetail.tsx index be2f536..76fc0b1 100644 --- a/src/pages/measure/components/MeasureDetail.tsx +++ b/src/pages/measure/components/MeasureDetail.tsx @@ -9,7 +9,6 @@ import { useNavigate } from 'react-router-dom'; import type { DetailTable } from "../../../services/measure/type"; import { ExclamationCircleFilled } from '@ant-design/icons'; -import { detailList } from '../../../mock/recordList' export default function MeasureDetail() { // 通过useSelector直接拿到store中定义的value //@ts-ignore @@ -73,7 +72,7 @@ export default function MeasureDetail() { setTableData(res.data.list) }).catch(e=>{ //如果接口异常,则使用mock数据 - setTableData(detailList) + // setTableData(detailList) }) }