import request from '@/utils/request'

// 查询任务列表
export function listPublish(query) {
  return request({
    url: '/admin/publish/list',
    method: 'get',
    params: query
  })
}

export function deletePublish(publishId) {
  return request({
    url: '/admin/publish/' + publishId,
    method: 'delete'
  })
}

export function takeOffPublish(publishId) {
  return request({
    url: '/admin/publish/takeOff/' + publishId,
    method: 'put'
  })
}

export function takeOnPublish(publishId) {
  return request({
    url: '/admin/publish/takeOn/' + publishId,
    method: 'put'
  })
}

// 查询发布需求任务详细信息
export function getPublishDetail(publishId) {
  return request({
    url: '/admin/publish/getDetail/' + publishId,
    method: 'get'
  })
}
