index.ts 791 B

123456789101112131415161718192021222324252627
  1. import { defHttp } from '@/config/axios'
  2. import type { NoticeVO } from './types'
  3. // 查询公告列表
  4. export const getNoticePageApi = ({ params }) => {
  5. return defHttp.get<PageResult<NoticeVO>>({ url: '/system/notice/page', params })
  6. }
  7. // 查询公告详情
  8. export const getNoticeApi = (id: number) => {
  9. return defHttp.get<NoticeVO>({ url: '/system/notice/get?id=' + id })
  10. }
  11. // 新增公告
  12. export const createNoticeApi = (params: NoticeVO) => {
  13. return defHttp.post({ url: '/system/notice/create', params })
  14. }
  15. // 修改公告
  16. export const updateNoticeApi = (params: NoticeVO) => {
  17. return defHttp.put({ url: '/system/notice/update', params })
  18. }
  19. // 删除公告
  20. export const deleteNoticeApi = (id: number) => {
  21. return defHttp.delete({ url: '/system/notice/delete?id=' + id })
  22. }