完善牧安云哨-前端

This commit is contained in:
BBIT-Kai
2025-12-29 16:30:04 +08:00
parent d78d3be5e0
commit cd7aa35960
7 changed files with 167 additions and 18 deletions
+19
View File
@@ -71,10 +71,29 @@ async function deleteDevice(id: string) {
return pyRequestClient.delete(`/iot/common/device/${id}`);
}
/**
* 发送指令
* @param data 设备数据
*/
async function iotSendCommand(
id: string,
command: string,
project: string,
device_type: string,
) {
return pyRequestClient.post('/iot/common/device/command', {
id,
command,
project,
device_type,
});
}
export {
createDevice,
deleteDevice,
getDeviceList,
iotSendCommand,
updateDevice,
updateDevicePatch,
};