完善牧安云哨-前端
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user