system.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. }