import request from '@/utils/request'

const noticeApi = {
  add: 'notice/addOrUpdate',
  del: 'notice/del',
  get: 'notice/get',
  page: 'notice/pageList',
  read: 'notice/read',
  pagePerson: 'notice/pagePersonList'
}

export function noticeAdd (params) {
  return request({
    url: noticeApi.add,
    method: 'post',
    data: params
  })
}
export function noticeDel (params) {
  return request({
    url: noticeApi.del,
    method: 'post',
    params: params
  })
}
export function noticeGet (params) {
  return request({
    url: noticeApi.get,
    method: 'get',
    params: params
  })
}
export function noticePage (params) {
  return request({
    url: noticeApi.page,
    method: 'post',
    params: {pageSize: params.pageSize, pageNum: params.pageNum},
    data: params
  })
}
export function noticeRead (params) {
  return request({
    url: noticeApi.read,
    method: 'get',
    params: params
  })
}
export function noticePagePerson (params) {
  return request({
    url: noticeApi.pagePerson,
    method: 'post',
    params: params
  })
}
