index.ts 782 B

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