import request from '/@/utils/request'

/** 查询公告列表 */
export function getList(params?: any) {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params,
  })
}

/** 新增公告 */
export const doAdd = (data: any) => {
  return request({
    url: '/system/notice',
    method: 'post',
    data,
  })
}

/** 修改公告 */
export const doEdit = (data: any) => {
  return request({
    url: '/system/notice',
    method: 'put',
    data,
  })
}

/** 删除公告 */
export const doDelete = (noticeId: any) => {
  return request({
    url: `/system/notice/${noticeId}`,
    method: 'delete',
  })
}

/** 查询公告详细 */
export function getNotice(noticeId: any) {
  return request({
    url: `/system/notice/${noticeId}`,
    method: 'get',
  })
}
