import request from '@/utils/request'

// 分页查询货源定向发布列表
export function pageListTarget(query) {
  return request({
    url: '/cargo/target/pageList',
    method: 'get',
    params: query
  })
}

// 查询货源定向发布列表
export function listTarget(query) {
  return request({
    url: '/cargo/target/list',
    method: 'get',
    params: query
  })
}

// 查询货源定向发布详细
export function getTarget(ID) {
  return request({
    url: '/cargo/target/' + ID,
    method: 'get'
  })
}

// 新增货源定向发布
export function addTarget(data) {
  return request({
    url: '/cargo/target',
    method: 'post',
    data: data
  })
}

// 修改货源定向发布
export function updateTarget(data) {
  return request({
    url: '/cargo/target',
    method: 'put',
    data: data
  })
}

// 删除货源定向发布
export function delTarget(ID) {
  return request({
    url: '/cargo/target/' + ID,
    method: 'delete'
  })
}

// 导出货源定向发布
export function exportTarget(query) {
  return request({
    url: '/cargo/target/' + 'export',
    method: 'post',
    params: query
  })
}
