import request from '@/utils/request'

// 查询分类列表
export function categoryList(query) {
  return request({
    url: `/device/manage/category/list`,
    method: 'get',
    params: query
  })
}

// 添加设备类型
export function categoryAdd(data) {
  return request({
    url: `/device/manage/category/add`,
    method: 'post',
    data: data
  })
}

// 编辑设备类型
export function categoryEdit(data) {
  return request({
    url: `/device/manage/category/edit`,
    method: 'post',
    data: data
  })
}

// 删除
export function categoryDelete(id) {
  return request({
    url: `/device/manage/category/${id}`,
    method: 'delete'
  })
}