import request from '@/utils/request'

// 分页列表
export function list(query) {
  return request({
    url: `/device/manage/list/page`,
    method: 'get',
    params: query
  })
}

// 设备详情
export function detail(query) {
  return request({
    url: `/device/manage/view`,
    method: 'get',
    params: query
  })
}

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

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

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

// 上下架
export function change(data){
  return request({
    url: `/device/manage/batchChangerStatus`,
    method: 'post',
    data
  })
}