|
|
@ -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 = <div> |
|
|
|
{bluetoothList.map(item => { |
|
|
|
return <div className="mt-[1rem]" onClick={connectBt}> |
|
|
|
<Button type="link">{item.name}</Button> |
|
|
|
{/* <Button type="link">{item.name}</Button> */} |
|
|
|
</div> |
|
|
|
})} |
|
|
|
</div> |
|
|
@ -82,8 +83,8 @@ export default function Header() { |
|
|
|
<div className="ml-[10px]">设备已连接</div> |
|
|
|
</div> |
|
|
|
<div className="pl-[15px]"> |
|
|
|
<div className="mt-[1rem]">型号:{bluetoothInfo.type}</div> |
|
|
|
<div className="mt-[1rem]">电量:{bluetoothInfo.power}</div> |
|
|
|
{/* <div className="mt-[1rem]">型号:{bluetoothInfo.type}</div> |
|
|
|
<div className="mt-[1rem]">电量:{bluetoothInfo.power}</div> */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|