api.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. //路径
  2. const root = "http://127.0.0.1:9999";
  3. //接口auth
  4. const api = {
  5. user: {
  6. list: `${root}/user/list`,
  7. add: `${root}/user/add`,
  8. update: `${root}/user/update`,
  9. detail: `${root}/user/detail`,
  10. delete: `${root}/user/delete`,
  11. batchDelete: `${root}/user/batchDelete`,
  12. bindRole: `${root}/user/bindRole`,
  13. bindOperator: `${root}/user/bindOperator`,
  14. },
  15. operator: {
  16. list: `${root}/operator/list`,
  17. add: `${root}/operator/add`,
  18. update: `${root}/operator/update`,
  19. detail: `${root}/operator/detail`,
  20. delete: `${root}/operator/delete`,
  21. batchDelete: `${root}/operator/batchDelete`
  22. },
  23. project: {
  24. list: `${root}/project/list`,
  25. operatorList: `${root}/project/operatorList`,
  26. add: `${root}/project/add`,
  27. update: `${root}/project/update`,
  28. detail: `${root}/project/detail`,
  29. delete: `${root}/project/delete`,
  30. batchDelete: `${root}/project/batchDelete`
  31. },
  32. gateway: {
  33. list: `${root}/gateway/list`,
  34. add: `${root}/gateway/add`,
  35. update: `${root}/gateway/update`,
  36. detail: `${root}/gateway/detail`,
  37. delete: `${root}/gateway/delete`,
  38. batchDelete: `${root}/gateway/batchDelete`
  39. },
  40. device: {
  41. list: `${root}/device/list`,
  42. add: `${root}/device/add`,
  43. update: `${root}/device/update`,
  44. detail: `${root}/device/detail`,
  45. delete: `${root}/device/delete`,
  46. batchDelete: `${root}/device/batchDelete`,
  47. },
  48. deviceParam: {
  49. list: `${root}/deviceParam/list`,
  50. add: `${root}/deviceParam/add`,
  51. update: `${root}/deviceParam/update`,
  52. updateParam: `${root}/deviceParam/updateParam`,
  53. detail: `${root}/deviceParam/detail`,
  54. delete: `${root}/deviceParam/delete`,
  55. batchDelete: `${root}/deviceParam/batchDelete`,
  56. getTimeData: `${root}/deviceParam/getTimeData`,
  57. },
  58. deviceAlarmRecord: {
  59. list: `${root}/deviceAlarmRecord/list`,
  60. add: `${root}/deviceAlarmRecord/add`,
  61. update: `${root}/deviceAlarmRecord/update`,
  62. detail: `${root}/deviceAlarmRecord/detail`,
  63. delete: `${root}/deviceAlarmRecord/delete`,
  64. batchDelete: `${root}/deviceAlarmRecord/batchDelete`,
  65. },
  66. deviceAlarmConfig: {
  67. list: `${root}/deviceAlarmConfig/list`,
  68. add: `${root}/deviceAlarmConfig/add`,
  69. update: `${root}/deviceAlarmConfig/update`,
  70. detail: `${root}/deviceAlarmConfig/detail`,
  71. delete: `${root}/deviceAlarmConfig/delete`,
  72. batchDelete: `${root}/deviceAlarmConfig/batchDelete`,
  73. },
  74. deviceAlarmRepairRecord: {
  75. list: `${root}/deviceAlarmRepairRecord/list`,
  76. add: `${root}/deviceAlarmRepairRecord/add`,
  77. update: `${root}/deviceAlarmRepairRecord/update`,
  78. detail: `${root}/deviceAlarmRepairRecord/detail`,
  79. delete: `${root}/deviceAlarmRepairRecord/delete`,
  80. batchDelete: `${root}/deviceAlarmRepairRecord/batchDelete`,
  81. },
  82. operatorLog: {
  83. list: `${root}/operatorLog/list`,
  84. add: `${root}/operatorLog/add`,
  85. update: `${root}/operatorLog/update`,
  86. detail: `${root}/operatorLog/detail`,
  87. delete: `${root}/operatorLog/delete`,
  88. batchDelete: `${root}/operatorLog/batchDelete`,
  89. },
  90. auth: {
  91. verifyCode: `${root}/auth/verifyCode`,
  92. login: `${root}/auth/login`,
  93. updateUserPassword: `${root}/auth/updateUserPassword`,
  94. userInfo: `${root}/auth/userInfo`,
  95. logout: `${root}/auth/logout`,
  96. },
  97. role: {
  98. list: `${root}/role/list`,
  99. add: `${root}/role/add`,
  100. update: `${root}/role/update`,
  101. detail: `${root}/role/detail`,
  102. delete: `${root}/role/delete`,
  103. },
  104. power: {
  105. list: `${root}/power/list`,
  106. add: `${root}/power/add`,
  107. update: `${root}/power/update`,
  108. detail: `${root}/power/detail`,
  109. delete: `${root}/power/delete`,
  110. },
  111. rolePower: {
  112. list: `${root}/rolePower/list`,
  113. add: `${root}/rolePower/add`,
  114. update: `${root}/rolePower/update`,
  115. detail: `${root}/rolePower/detail`,
  116. delete: `${root}/rolePower/delete`,
  117. },
  118. menu: {}
  119. };
  120. export default Object.assign({
  121. $base: {
  122. root: root,
  123. },
  124. },
  125. api
  126. )