@@ -6,7 +6,7 @@ export async function getDevices(){
name: '',
productId: '',
};
- const ret: { list: any[]; total: number; type:number } = await axios.post(
+ const ret: { records: any[]; total: number; type:number } = await axios.post(
'/api/iot/devices'
// '/api/iot/device/list'
);
@@ -1280,7 +1280,7 @@ const getIotTree = async () => {
}
let ret = await getDevices();
const type = ret.type;
- const list = ret.list;
+ const list = ret.records;
for (let i = 0; i < list.length; i++) {
const item = list[i];
item.label = item.name;