import request from '@/utils/request'

// 查询政策公告列表
export function listPolicy(query) {
  return request({
    url: '/policy/policy/list',
    method: 'get',
    params: query
  })
}

// 查询政策公告详细
export function getPolicy(policyId) {
  return request({
    url: '/policy/policy/' + policyId,
    method: 'get'
  })
}

// 新增政策公告
export function addPolicy(data) {
  return request({
    url: '/policy/policy',
    method: 'post',
    data: data
  })
}

// 修改政策公告
export function updatePolicy(data) {
  return request({
    url: '/policy/policy',
    method: 'put',
    data: data
  })
}

// 删除政策公告
export function delPolicy(policyId) {
  return request({
    url: '/policy/policy/' + policyId,
    method: 'delete'
  })
}

// 导出政策公告
export function exportPolicy(query) {
  return request({
    url: '/policy/policy/export',
    method: 'get',
    params: query
  })
}