index.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. import { defHttp } from '/@/utils/http/axios';
  2. import {
  3. PageParams,
  4. operateList,
  5. sceneMoveParams,
  6. sceneControlParams,
  7. RentListGetResultModel,
  8. addCameraParams,
  9. updateParams,
  10. } from './model';
  11. import { Result } from '/#/axios';
  12. enum Api {
  13. pageList = '/newV4/service/manage/news/pageNews',
  14. operateSceneList = '/newV4/service/manage/scene/list',
  15. sceneMove = '/newV4/service/manage/scene/move',
  16. sceneDelete = '/newV4/service/manage/scene/delete',
  17. sceneDownload = '/newV4/service/manage/scene/downScene',
  18. sceneCopy = '/newV4/service/manage/scene/copy',
  19. checkDownLoad = '/newV4/service/manage/scene/checkDownLoad',
  20. downloadProcess = '/newV4/service/manage/scene/downloadProcess',
  21. rebuildScene = '/newV4/service/manage/scene/rebuildScene',
  22. overallList = '/newV4/service/manage/overall/list',
  23. overallDelete = '/newV4/service/manage/overall/delete',
  24. }
  25. /**
  26. * @description: Get sample list value
  27. */
  28. export const ListApi = (params: PageParams) =>
  29. defHttp.post<RentListGetResultModel>({
  30. url: Api.pageList,
  31. params: params,
  32. // data: params,
  33. headers: {
  34. // @ts-ignore
  35. ignoreCancelToken: true,
  36. },
  37. });
  38. export const operateSceneList = (params: operateList) =>
  39. defHttp.post<Result>({
  40. url: Api.operateSceneList,
  41. params: params,
  42. // data: params,
  43. headers: {
  44. // @ts-ignore
  45. ignoreCancelToken: true,
  46. },
  47. });
  48. export const overallList = (params: overallList) =>
  49. defHttp.post<Result>({
  50. url: Api.overallList,
  51. params: params,
  52. // data: params,
  53. headers: {
  54. // @ts-ignore
  55. ignoreCancelToken: true,
  56. },
  57. });
  58. export const overallDelete = (params: overallList) =>
  59. defHttp.post<Result>({
  60. url: Api.overallDelete,
  61. params: params,
  62. // data: params,
  63. headers: {
  64. // @ts-ignore
  65. ignoreCancelToken: true,
  66. },
  67. });
  68. export const sceneMove = (params: sceneMoveParams) =>
  69. defHttp.post<Result>({
  70. url: Api.sceneMove,
  71. params: params,
  72. // data: params,
  73. headers: {
  74. // @ts-ignore
  75. ignoreCancelToken: true,
  76. },
  77. });
  78. export const rebuildScene = (params: sceneControlParams) =>
  79. defHttp.get<Result>({
  80. url: Api.rebuildScene,
  81. params: params,
  82. // data: params,
  83. headers: {
  84. // @ts-ignore
  85. ignoreCancelToken: true,
  86. },
  87. });
  88. export const sceneDelete = (params: sceneControlParams) =>
  89. defHttp.post<Result>({
  90. url: Api.sceneDelete,
  91. params: params,
  92. // data: params,
  93. headers: {
  94. // @ts-ignore
  95. ignoreCancelToken: true,
  96. },
  97. });
  98. export const checkDownLoad = (params: sceneControlParams) =>
  99. defHttp.get<Result>({
  100. url: Api.checkDownLoad,
  101. params: params,
  102. // data: params,
  103. headers: {
  104. // @ts-ignore
  105. ignoreCancelToken: true,
  106. },
  107. });
  108. export const sceneDownload = (params: sceneControlParams) =>
  109. defHttp.get<Result>({
  110. url: Api.sceneDownload,
  111. params: params,
  112. // data: params,
  113. headers: {
  114. // @ts-ignore
  115. ignoreCancelToken: true,
  116. },
  117. });
  118. export const downloadProcess = (params: sceneControlParams) =>
  119. defHttp.get<Result>({
  120. url: Api.downloadProcess,
  121. params: params,
  122. // data: params,
  123. headers: {
  124. // @ts-ignore
  125. ignoreCancelToken: true,
  126. },
  127. });
  128. export const sceneCopy = (params: sceneControlParams) =>
  129. defHttp.post<Result>({
  130. url: Api.sceneCopy,
  131. params: params,
  132. // data: params,
  133. headers: {
  134. // @ts-ignore
  135. ignoreCancelToken: true,
  136. },
  137. });
  138. // export const unDeviceApi = (params: PageParams) =>
  139. // defHttp.post<RentListGetResultModel>({
  140. // url: Api.unbindDevice,
  141. // params,
  142. // headers: {
  143. // // @ts-ignore
  144. // ignoreCancelToken: true,
  145. // },
  146. // });
  147. // export const allCompanyApi = (params: PageParams) =>
  148. // defHttp.post<RentListGetResultModel>({
  149. // url: Api.allCompany,
  150. // params,
  151. // headers: {
  152. // // @ts-ignore
  153. // ignoreCancelToken: true,
  154. // },
  155. // });
  156. // export const addCameraApi = (params: addCameraParams) =>
  157. // defHttp.post<RentListGetResultModel>({
  158. // url: Api.addCamera,
  159. // params,
  160. // headers: {
  161. // // @ts-ignore
  162. // ignoreCancelToken: true,
  163. // },
  164. // });
  165. // export const editCameraApi = (params: addCameraParams) =>
  166. // defHttp.post<RentListGetResultModel>({
  167. // url: Api.editCamera,
  168. // params,
  169. // headers: {
  170. // // @ts-ignore
  171. // ignoreCancelToken: true,
  172. // },
  173. // });
  174. // export const updateLiveRoomInfoApi = (params: updateParams) =>
  175. // defHttp.post<Result>({
  176. // url: Api.updateLiveRoomInfo,
  177. // params,
  178. // headers: {
  179. // // @ts-ignore
  180. // ignoreCancelToken: true,
  181. // },
  182. // });