import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/box',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/box/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/box',
    method: 'put',
    data
  })
}

export function bindOrder(data) {
  return request({
    url: 'api/app/bindOrder',
    method: 'post',
    data
  })
}

//按钮车呼叫
export function callTrolley(id,pointCode) {
  return request({
    url: 'api/app/callTrolley?id='+id+"&pointCode="+pointCode,
    method: 'post'
  })
}

//按钮盒呼叫
export function callBox(data) {
  return request({
    url: 'api/app/callBox',
    method: 'post',
    data
  })
}

export default { add, edit, del,bindOrder ,callBox}
