import request from '@/utils/request'
// 获取系统公告列表
export function getAnnouncementList(data) {
  return request({
    url: '/system/getAnnouncementList',
    method: 'post',
    params: data
  })
}
// 新增系统公告:
export function addAnnouncement(data) {
  return request({
    url: '/system/addAnnouncement',
    method: 'post',
    data: data
  })
}
// 修改系统公告:
export function updateAnnouncement(data) {
  return request({
    url: '/system/updateAnnouncement',
    method: 'post',
    data: data
  })
}
// 根据id获取公告信息详情
export function getAnnouncementById(data) {
  return request({
    url: '/system/getAnnouncementById',
    method: 'post',
    params: data
  })
}
// 保存公告内容
export function saveAnnouncementContent(data) {
  return request({
    url: '/system/saveAnnouncementContent',
    method: 'post',
    data: data
  })
}
// 发布系统公告
export function releaseAnnouncement(data) {
  return request({
    url: '/system/releaseAnnouncement',
    method: 'post',
    params: data
  })
}
// 取消发布
export function cancelReleaseAnnouncement (data) {
  return request({
    url: '/system/cancelReleaseAnnouncement',
    method: 'post',
    params: data
  })
}
//启用/禁用系统公告
export function voidAnnouncement(data) {
  return request({
    url: '/system/voidAnnouncement',
    method: 'post',
    params: data
  })
}
// 系统公告支持上传附件,接口:/upload/uploadAnnouncementAttachment
export function uploadAnnouncementAttachment(data) {
  return request({
    url: '/upload/uploadAnnouncementAttachment',
    method: 'post',
    data: data
  })
}

