system.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. import HttpAxios from '@/utils/axios'
  2. const base = import.meta.env.VITE_API_HOST
  3. const baseUrl = `${base}/main_new_version.php`
  4. /**
  5. * 获取subscribe数据
  6. */
  7. export const getsubscribe = (params: any, config: any) => {
  8. return HttpAxios.get(
  9. `${baseUrl}`,
  10. {
  11. action: 'system_setting',
  12. operate: 'subscribe_notification_init',
  13. ...params
  14. },
  15. config
  16. )
  17. }
  18. /**
  19. * 提交subscribe数据
  20. */
  21. export const Savesubscribe = (params: any, config: any) => {
  22. return HttpAxios.post(
  23. `${baseUrl}`,
  24. {
  25. action: 'system_setting',
  26. operate: 'subscribe_notification_event_update',
  27. ...params
  28. },
  29. config
  30. )
  31. }
  32. /**
  33. * 删除AddedRules表格数据
  34. */
  35. export const DeleteAddedRules = (params: any, config: any) => {
  36. return HttpAxios.post(
  37. `${baseUrl}`,
  38. {
  39. action: 'system_setting',
  40. operate: 'subscribe_notification_rules_delete',
  41. ...params
  42. },
  43. config
  44. )
  45. }
  46. /**
  47. * 收藏
  48. */
  49. export const SubscribeShipments = (params: any, config: any) => {
  50. return HttpAxios.post(
  51. `${baseUrl}`,
  52. {
  53. action: 'system_setting',
  54. operate: 'subscribe_shipment',
  55. ...params
  56. },
  57. config
  58. )
  59. }
  60. /**
  61. * 收藏表格分页切换
  62. */
  63. export const SubscribePagination = (params: any, config: any) => {
  64. return HttpAxios.post(
  65. `${baseUrl}`,
  66. {
  67. action: 'system_setting',
  68. operate: 'subscribe_shipment_search',
  69. ...params
  70. },
  71. config
  72. )
  73. }
  74. /**
  75. * 初始化数据
  76. */
  77. export const MonitoringInit = (params: any, config: any) => {
  78. return HttpAxios.get(
  79. `${baseUrl}`,
  80. {
  81. action: 'monitoring_setting',
  82. operate: 'monitoring_rules_init',
  83. ...params
  84. },
  85. config
  86. )
  87. }
  88. /**
  89. * Monitoring保存数据
  90. */
  91. export const MonitoringSave = (params: any, config: any) => {
  92. return HttpAxios.post(
  93. `${baseUrl}`,
  94. {
  95. action: 'monitoring_setting',
  96. operate: 'monitoring_rules_do',
  97. ...params
  98. },
  99. config
  100. )
  101. }
  102. /**
  103. * Monitoring表格数据
  104. */
  105. export const MonitoringTable = (params: any, config: any) => {
  106. return HttpAxios.post(
  107. `${baseUrl}`,
  108. {
  109. action: 'monitoring_setting',
  110. operate: 'monitoring_rules_search',
  111. ...params
  112. },
  113. config
  114. )
  115. }
  116. /**
  117. * 删除Monitoring表格数据
  118. */
  119. export const deleteMonitoringTable = (params: any, config: any) => {
  120. return HttpAxios.post(
  121. `${baseUrl}`,
  122. {
  123. action: 'monitoring_setting',
  124. operate: 'monitoring_rules_delete',
  125. ...params
  126. },
  127. config
  128. )
  129. }
  130. /**
  131. * 编辑Monitoring表格数据
  132. */
  133. export const EditMonitoringTable = (params: any, config: any) => {
  134. return HttpAxios.post(
  135. `${baseUrl}`,
  136. {
  137. action: 'monitoring_setting',
  138. operate: 'monitoring_rules_edit',
  139. ...params
  140. },
  141. config
  142. )
  143. }
  144. /**
  145. * 第一次点击设置页面
  146. */
  147. export const FirstInitSubscribe = (params: any, config: any) => {
  148. return HttpAxios.post(
  149. `${baseUrl}`,
  150. {
  151. action: 'system_setting',
  152. operate: 'subscribe_notification_default_init',
  153. ...params
  154. },
  155. config
  156. )
  157. }