index.ts 743 B

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