list.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { defHttp } from '/@/utils/http/axios';
  2. import { PageParams, ListGetResultModel, NoticeParams } from './model';
  3. import { Result } from '/#/axios';
  4. enum Api {
  5. pageList = '/zfb-api/zfb/platform/notice/list',
  6. addNotice = '/zfb-api/zfb/platform/notice/save',
  7. delNotice = '/zfb-api/zfb/platform/notice/delete',
  8. unreadNoticesList = '/zfb-api/zfb/platform/notice/unreadNoticesList',
  9. }
  10. /**
  11. * @description: Get sample list value
  12. */
  13. export const ListApi = (params: PageParams) =>
  14. defHttp.post<ListGetResultModel>({
  15. url: Api.pageList,
  16. params,
  17. headers: {
  18. // @ts-ignore
  19. ignoreCancelToken: true,
  20. },
  21. });
  22. export const addNoticeApi = (params: NoticeParams) =>
  23. defHttp.post<Result>({
  24. url: Api.addNotice,
  25. params,
  26. headers: {
  27. // @ts-ignore
  28. ignoreCancelToken: true,
  29. },
  30. });
  31. export const editNoticeApi = (params: NoticeParams) =>
  32. defHttp.post<Result>({
  33. url: Api.addNotice,
  34. params,
  35. headers: {
  36. // @ts-ignore
  37. ignoreCancelToken: true,
  38. },
  39. });