import request from '@/utils/request'

// 查询设备列表
export function list(query) {
  return request({
    url: '/equimpent/getEquipmentList',
    method: 'get',
    params: query
  })
}

// 添加设备
export function add(data) {
  return request({
    url: '/equimpent/addEquipment',
    method: 'post',
    data: data
  })
}

// 广告设置
export function adSetting(data) {
  return request({
    url: '/equimpent/updateEquipmentPlan',
    method:'put',
    data: data
  })
}

//移除广告
export function adMove(data) {
  return request({
    url:'/equimpent/deleteEquipmentPlan',
    method: 'DELETE',
    params: data
  })
}

//删除设备
export function del(data) {
  return request({
    url:'/equimpent/deleteEquipment',
    method: 'DELETE',
    params: data
  })
}

//修改设备
export function update(data) {
  return request({
    url: '/equimpent/updateEquipment',
    method: 'put',
    data: data
  })
}

export function adList(data) {
  return request({
    url:'/equimpent/getEquipmentPlanList',
    method: 'get',
    params:data
  })
}
//修改第三方设备状态
export function otherEquipState(data) {
  return request({
    url:'/equimpent/equipmentOnStateChange',
    method: 'get',
    params:data
  })
}