12345678910111213141516171819 |
- 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?deviceId=' + Device,'GET'),
- //配置回路参数
- postloop:(params) => request('/devices/relays','POST',params),
- //控制回路开关
- loopSwitch:(params) => request('/devices/operation','POST',params),
- //获取回路的开关状态
- loopSwitchstate:(Device) => request('/devices/relays/status?deviceId='+ Device,'GET')
- }
|