123456789101112131415161718192021 |
- const {request} = require('../https/request.js')
- module.exports = {
- //添加设备
- postDevice: (params) => request('/devices', 'POST', params),
- //获取设备信息
- getDevice: (Device,Group) => request('/devices?id=' + Device + '&group_id='+ Group, 'GET'),
- //修改设备
- putDevice: (params) => request('/devices', 'PUT', params),
- //删除设备
- delDevice: (Device) => request('/devices?id=' + Device,'DELETE'),
- //获取回路参数
- getloop:(Device) => request('/devices/relays?device_id=' + Device,'GET'),
- //配置回路参数
- postloop:(params) => request('/devices/relays','POST',params),
- //控制回路开关
- loopSwitch:(params) => request('/devices/operation','POST',params),
- //获取回路的开关状态
- loopSwitchstate:(Device) => request('/devices/relays/status?device_id='+ Device,'GET'),
- //获取回路的光照度列表
- looplightlist:() => request('/illuminance','GET')
- }
|