list.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { defHttp } from '/@/utils/http/axios';
  2. import { PageParams, RentListGetResultModel, addCamerParams } from './model';
  3. enum Api {
  4. pageList = '/zfb-api/zfb/camera/pageList',
  5. addCamera = '/zfb-api/zfb/camera/add',
  6. allCompany = '/zfb-api/zfb/company/listAll',
  7. }
  8. /**
  9. * @description: Get sample list value
  10. */
  11. export const ListApi = (params: PageParams) =>
  12. defHttp.post<RentListGetResultModel>({
  13. url: Api.pageList,
  14. params,
  15. headers: {
  16. // @ts-ignore
  17. ignoreCancelToken: true,
  18. },
  19. });
  20. // export const ListApi = (params: PageParams) =>
  21. // defHttp.post<RentListGetResultModel>({
  22. // url: Api.pageList,
  23. // params,
  24. // headers: {
  25. // // @ts-ignore
  26. // ignoreCancelToken: true,
  27. // },
  28. // });
  29. export const allCompanyApi = (params: PageParams) =>
  30. defHttp.post<RentListGetResultModel>({
  31. url: Api.allCompany,
  32. params,
  33. headers: {
  34. // @ts-ignore
  35. ignoreCancelToken: true,
  36. },
  37. });
  38. export const addCameraApi = (params: addCamerParams) =>
  39. defHttp.post<RentListGetResultModel>({
  40. url: Api.addCamera,
  41. params,
  42. headers: {
  43. // @ts-ignore
  44. ignoreCancelToken: true,
  45. },
  46. });