|
|
@ -35,14 +35,21 @@ export default function Header() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let [bluetoothList, setbluetoothList] = useState<Device[]>([]) |
|
|
|
let list = [{ |
|
|
|
name:'Kdkow_1', |
|
|
|
id:'1', |
|
|
|
},{ |
|
|
|
name:'llwoa_2', |
|
|
|
id:'2', |
|
|
|
}] |
|
|
|
let [bluetoothList, setbluetoothList] = useState(list) |
|
|
|
//获取mock数据
|
|
|
|
useEffect(()=>{ |
|
|
|
getDeviceInfo().then(res => { |
|
|
|
console.log('res===', res) |
|
|
|
//@ts-ignore
|
|
|
|
setbluetoothList(res.data.list) |
|
|
|
}) |
|
|
|
// getDeviceInfo().then(res => {
|
|
|
|
// console.log('res===', res)
|
|
|
|
// //@ts-ignore
|
|
|
|
// setbluetoothList(res.data.list)
|
|
|
|
// })
|
|
|
|
}) |
|
|
|
|
|
|
|
//@ts-ignore
|
|
|
|