index.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import { defHttp } from '/@/utils/http/axios';
  2. import {
  3. PageParams,
  4. operateList,
  5. RentListGetResultModel,
  6. addCameraParams,
  7. updateParams,
  8. } from './model';
  9. import { Result } from '/#/axios';
  10. enum Api {
  11. pageList = '/newV4/service/manage/news/pageNews',
  12. operateSceneList = '/newV4/service/manage/scene/list',
  13. }
  14. /**
  15. * @description: Get sample list value
  16. */
  17. export const ListApi = (params: PageParams) =>
  18. defHttp.post<RentListGetResultModel>({
  19. url: Api.pageList,
  20. params: params,
  21. // data: params,
  22. headers: {
  23. // @ts-ignore
  24. ignoreCancelToken: true,
  25. },
  26. });
  27. export const operateSceneList = (params: operateList) =>
  28. defHttp.post<Result>({
  29. url: Api.operateSceneList,
  30. params: params,
  31. // data: params,
  32. headers: {
  33. // @ts-ignore
  34. ignoreCancelToken: true,
  35. },
  36. });
  37. // export const unDeviceApi = (params: PageParams) =>
  38. // defHttp.post<RentListGetResultModel>({
  39. // url: Api.unbindDevice,
  40. // params,
  41. // headers: {
  42. // // @ts-ignore
  43. // ignoreCancelToken: true,
  44. // },
  45. // });
  46. // export const allCompanyApi = (params: PageParams) =>
  47. // defHttp.post<RentListGetResultModel>({
  48. // url: Api.allCompany,
  49. // params,
  50. // headers: {
  51. // // @ts-ignore
  52. // ignoreCancelToken: true,
  53. // },
  54. // });
  55. // export const addCameraApi = (params: addCameraParams) =>
  56. // defHttp.post<RentListGetResultModel>({
  57. // url: Api.addCamera,
  58. // params,
  59. // headers: {
  60. // // @ts-ignore
  61. // ignoreCancelToken: true,
  62. // },
  63. // });
  64. // export const editCameraApi = (params: addCameraParams) =>
  65. // defHttp.post<RentListGetResultModel>({
  66. // url: Api.editCamera,
  67. // params,
  68. // headers: {
  69. // // @ts-ignore
  70. // ignoreCancelToken: true,
  71. // },
  72. // });
  73. // export const updateLiveRoomInfoApi = (params: updateParams) =>
  74. // defHttp.post<Result>({
  75. // url: Api.updateLiveRoomInfo,
  76. // params,
  77. // headers: {
  78. // // @ts-ignore
  79. // ignoreCancelToken: true,
  80. // },
  81. // });