api.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. },
  57. deviceAlarmRecord: {
  58. list: `${root}/deviceAlarmRecord/list`,
  59. add: `${root}/deviceAlarmRecord/add`,
  60. update: `${root}/deviceAlarmRecord/update`,
  61. detail: `${root}/deviceAlarmRecord/detail`,
  62. delete: `${root}/deviceAlarmRecord/delete`,
  63. batchDelete: `${root}/deviceAlarmRecord/batchDelete`,
  64. },
  65. deviceAlarmConfig: {
  66. list: `${root}/deviceAlarmConfig/list`,
  67. add: `${root}/deviceAlarmConfig/add`,
  68. update: `${root}/deviceAlarmConfig/update`,
  69. detail: `${root}/deviceAlarmConfig/detail`,
  70. delete: `${root}/deviceAlarmConfig/delete`,
  71. batchDelete: `${root}/deviceAlarmConfig/batchDelete`,
  72. },
  73. deviceAlarmRepairRecord: {
  74. list: `${root}/deviceAlarmRepairRecord/list`,
  75. add: `${root}/deviceAlarmRepairRecord/add`,
  76. update: `${root}/deviceAlarmRepairRecord/update`,
  77. detail: `${root}/deviceAlarmRepairRecord/detail`,
  78. delete: `${root}/deviceAlarmRepairRecord/delete`,
  79. batchDelete: `${root}/deviceAlarmRepairRecord/batchDelete`,
  80. },
  81. operatorLog: {
  82. list: `${root}/operatorLog/list`,
  83. add: `${root}/operatorLog/add`,
  84. update: `${root}/operatorLog/update`,
  85. detail: `${root}/operatorLog/detail`,
  86. delete: `${root}/operatorLog/delete`,
  87. batchDelete: `${root}/operatorLog/batchDelete`,
  88. },
  89. auth: {
  90. verifyCode: `${root}/auth/verifyCode`,
  91. login: `${root}/auth/login`,
  92. updateUserPassword: `${root}/auth/updateUserPassword`,
  93. userInfo: `${root}/auth/userInfo`,
  94. logout: `${root}/auth/logout`,
  95. },
  96. role: {
  97. list: `${root}/role/list`,
  98. add: `${root}/role/add`,
  99. update: `${root}/role/update`,
  100. detail: `${root}/role/detail`,
  101. delete: `${root}/role/delete`,
  102. },
  103. power: {
  104. list: `${root}/power/list`,
  105. add: `${root}/power/add`,
  106. update: `${root}/power/update`,
  107. detail: `${root}/power/detail`,
  108. delete: `${root}/power/delete`,
  109. },
  110. rolePower: {
  111. list: `${root}/rolePower/list`,
  112. add: `${root}/rolePower/add`,
  113. update: `${root}/rolePower/update`,
  114. detail: `${root}/rolePower/detail`,
  115. delete: `${root}/rolePower/delete`,
  116. },
  117. menu: {}
  118. };
  119. export default Object.assign({
  120. $base: {
  121. root: root,
  122. },
  123. },
  124. api
  125. )