import request from '@/utils/request'

// 查询内容管理列表
export function listContent(query) {
  return request({
    url: '/management/content/list',
    method: 'get',
    params: query
  })
}

// 查询内容管理详细
export function getContent(contentId) {
  return request({
    url: '/management/content/' + contentId,
    method: 'get'
  })
}

// 新增内容管理
export function addContent(data) {
  return request({
    url: '/management/content',
    method: 'post',
    data: data
  })
}

// 修改内容管理
export function updateContent(data) {
  return request({
    url: '/management/content',
    method: 'put',
    data: data
  })
}

// 删除内容管理
export function delContent(contentId) {
  return request({
    url: '/management/content/' + contentId,
    method: 'delete'
  })
}

// 导出内容管理
export function exportContent(query) {
  return request({
    url: '/management/content/export',
    method: 'get',
    params: query
  })
}

// 初审内容管理
export function auditContent(data) {
    return request({
      url: '/management/content/audit',
      method: 'post',
      data: data
    })
  }

  // 终审内容管理
export function endAuditContent(data) {
    return request({
      url: '/management/content/endAudit',
      method: 'post',
      data: data
    })
  }

  // 发布内容管理
export function releaseContent(data) {
    return request({
      url: '/management/content/release',
      method: 'post',
      data: data
    })
  }