import { axios } from '@/utils/request'

//  公告 列表  有分页
export const noticeList = (params) => {
  const url = `/notice/queryLike/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers:{
        'module': encodeURIComponent('列表查询')
    }
  })
}
//  公告 保存
export const noticeSave = (params) => {
  return axios({
    url: '/notice/save',
    data: params,
    method: 'post',
    headers:{
        'module': encodeURIComponent('新增/编辑')
    }
  })
}
//  公告 删除
export const noticeDel = (params) => {
  const url = `/notice/delete/${params.id}`
  return axios({
    url: url,
    method: 'get',
    headers:{
        'module': encodeURIComponent('删除')
    }
  })
}
//  公告 详情
export const noticeDetail = (params) => {
  const url = `/notice/findById/${params.id}`
  return axios({
    url: url,
    method: 'get',
    headers:{
        'module': encodeURIComponent('公告详情')
    }
  })
}
