import request from '@/utils/request'

// 查询公告列表
export function listApply(query) {
  return request({
    url: '/reward/apply/list',
    method: 'get',
    params: query
  })
}
//根据奖项类型生成applyId
export function getApplyId(query) {
  return request({
    url: '/reward/apply/getApplyId',
    method: 'get',
    params: query
  })
}
//查询详细
export function getDetail(query) {
  return request({
    url: '/reward/apply/detail/' + query,
    method: 'get'
  })
}
// 修改
export function updateApply(data) {
  return request({
    url: '/reward/apply/submit',
    method: 'post',
    data: data
  })
}
// 删除公告
export function delApply(applyId) {
  return request({
    url: '/reward/apply/delete/' + applyId,
    method: 'delete'
  })
}
// 删除文件
export function delFile(fileId) {
  return request({
    url: '/reward/file/delFile/' + fileId,
    method: 'get'
  })
}
// 查询文件列表
export function listFile(query) {
  return request({
    url: '/reward/file/getFileInfo',
    method: 'get',
    params: {applyId:query}
  })
}
