device.js 520 B

12345678910111213
  1. const {request} = require('../https/request.js')
  2. module.exports = {
  3. //添加设备
  4. postDevice: (params) => request('/devices', 'POST', params),
  5. //获取设备信息
  6. getDevice: (Device,Group) => request('/devices?id=' + Device + '&group_id='+ Group, 'GET'),
  7. //修改设备
  8. putDevice: (params) => request('/devices', 'PUT', params),
  9. //删除设备
  10. delDevice: (Device) => request('/devices?id=' + Device,'DELETE'),
  11. //获取回路参数
  12. getloop:(Device) => request('/devices/relays?id=' + Device,'GET')
  13. }