import request from '@/utils/request'

// 查询列表
export function getDeviceList(params) {
  return request({
    url: '/yfc-admin/web/device/list',
    method: 'get',
    params
  })
}

// 查询详情
export function getDeviceDetail(id) {
  return request({
    url: '/yfc-admin/web/device/' + id,
    method: 'get'
  })
}

// 新增设备
export function addDevice(data) {
  return request({
    url: '/yfc-admin/web/device',
    method: 'post',
    data
  })
}

// 修改设备
export function updateDevice(data) {
  return request({
    url: '/yfc-admin/web/device',
    method: 'put',
    data
  })
}

// 删除设备
export function deleteDevice(id) {
  return request({
    url: '/yfc-admin/web/device/' + id,
    method: 'delete'
  })
}
