api.js 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. const baseUrl = '/api'
  2. const common = '/common'
  3. const guest = '/guest'
  4. const $api = {
  5. login: { // 登陆
  6. signin: {
  7. method: 'post',
  8. url: `${baseUrl}${guest}/signin`
  9. }
  10. },
  11. system: {
  12. init: { // 初始化菜单
  13. method: 'get',
  14. url: `${baseUrl}${common}/system/init`
  15. }
  16. },
  17. channelManager: {
  18. getChannelList: { // 渠道列表
  19. method: 'get',
  20. url: `${baseUrl}${common}/`
  21. },
  22. },
  23. caseManager: {
  24. getCaseList: { // 获取案场列表
  25. method: 'get',
  26. url: `${baseUrl}${common}/case/info`
  27. },
  28. addCase: { // 新增案场
  29. method: 'post',
  30. url: `${baseUrl}${common}/case/info`
  31. },
  32. getCaseInfo: { // 查询案场
  33. method: 'get',
  34. url: `${baseUrl}${common}/case/info/:id`
  35. },
  36. editCase: { // 编辑案场
  37. method: 'put',
  38. url: `${baseUrl}${common}/case/info/:id`
  39. },
  40. getKeyList: { // 获取钥匙列表
  41. method: 'get',
  42. url: `${baseUrl}${common}/case/key`
  43. },
  44. addKey: { // 新增钥匙
  45. method: 'post',
  46. url: `${baseUrl}${common}/case/key`
  47. },
  48. cancelKey: { // 取消钥匙
  49. method: 'put',
  50. url: `${baseUrl}${common}/case/unlock/:id`
  51. },
  52. getCaseAreaList: { // 获取案场区域列表
  53. method: 'get',
  54. url: `${baseUrl}${common}/case/area`
  55. },
  56. addCaseArea: { // 新增案场区域
  57. method: 'post',
  58. url: `${baseUrl}${common}/case/area`
  59. },
  60. deleteCaseArea: { // 删除案场区域
  61. method: 'delete',
  62. url: `${baseUrl}${common}/case/area/:id`
  63. },
  64. getCaseAreaInfo: { // 获取案场区域信息
  65. method: 'get',
  66. url: `${baseUrl}${common}/case/area/:id`
  67. },
  68. editCaseArea: { // 更新案场区域信息
  69. method: 'put',
  70. url: `${baseUrl}${common}/case/area`
  71. },
  72. getCaseTableList: { // 获取案场桌位列表
  73. method: 'get',
  74. url: `${baseUrl}${common}/case/table`
  75. },
  76. addCaseTable: { // 新增案场桌位
  77. method: 'post',
  78. url: `${baseUrl}${common}/case/table`
  79. },
  80. getCaseTableInfo: { // 查询案场桌位信息
  81. method: 'get',
  82. url: `${baseUrl}${common}/case/table/:id`
  83. },
  84. editCaseTable: { // 更新案场桌位信息
  85. method: 'put',
  86. url: `${baseUrl}${common}/case/table`
  87. },
  88. deleteCaseTable: { // 删除案场桌位信息
  89. method: 'delete',
  90. url: `${baseUrl}${common}/case/table/:id`
  91. },
  92. getCaseTagList: { // 获取案场标签列表
  93. method: 'get',
  94. url: `${baseUrl}${common}/case/tag`
  95. },
  96. addCaseTag: { // 新增案场标签
  97. method: 'post',
  98. url: `${baseUrl}${common}/case/tag`
  99. },
  100. getTagInfo: { // 获取案场标签信息
  101. method: 'get',
  102. url: `${baseUrl}${common}/case/tag/:id`
  103. },
  104. deleteCaseTag: { // 删除案场标签
  105. method: 'delete',
  106. url: `${baseUrl}${common}/case/tag/:id`
  107. },
  108. },
  109. goodsManager: {
  110. getGoodsSpecList: { // 商品规格列表
  111. method: 'get',
  112. url: `${baseUrl}${common}/spec/goods`
  113. },
  114. addGoodsSpec: { // 新增商品规格
  115. method: 'post',
  116. url: `${baseUrl}${common}/spec/goods`
  117. },
  118. getGoodsSpecById: { // 根据id获取商品规格
  119. method: 'get',
  120. url: `${baseUrl}${common}/spec/goods/:id`
  121. },
  122. editGoodsSpec: { // 编辑商品规格
  123. method: 'put',
  124. url: `${baseUrl}${common}/spec/goods/:id`
  125. },
  126. deleteGoodsSpec: { // 删除商品规格
  127. method: 'delete',
  128. url: `${baseUrl}${common}/spec/goods/:id`
  129. },
  130. getGoodsTypeList: { // 商品种类列表
  131. method: 'get',
  132. url: `${baseUrl}${common}/type/goods`
  133. },
  134. addGoodsType: { // 新增商品种类
  135. method: 'post',
  136. url: `${baseUrl}${common}/type/goods`
  137. },
  138. getGoodsTypeById: { // 根据id获取商品种类
  139. method: 'get',
  140. url: `${baseUrl}${common}/type/goods/:id`
  141. },
  142. editGoodsType: { // 编辑商品种类
  143. method: 'put',
  144. url: `${baseUrl}${common}/type/goods/:id`
  145. },
  146. deleteGoodsType: { // 删除商品种类
  147. method: 'delete',
  148. url: `${baseUrl}${common}/type/goods/:id`
  149. },
  150. },
  151. cms: {
  152. location: { // 图片位置
  153. method: 'get',
  154. url: `${baseUrl}${common}/cms/location`
  155. },
  156. imageList: { // 轮播图列表
  157. method: 'get',
  158. url: `${baseUrl}${common}/cms/image`
  159. },
  160. imageDetail: { // 轮播图详情
  161. method: 'get',
  162. url: `${baseUrl}${common}/cms/image/:id`
  163. },
  164. addImage: { // 添加轮播图
  165. method: 'post',
  166. url: `${baseUrl}${common}/cms/image`
  167. },
  168. editImage: { // 编辑轮播图
  169. method: 'put',
  170. url: `${baseUrl}${common}/cms/image/:id`
  171. },
  172. deleteDetail: { // 删除轮播图
  173. method: 'delete',
  174. url: `${baseUrl}${common}/cms/image/:id`
  175. },
  176. case: { // 首页案场列表
  177. method: 'get',
  178. url: `${baseUrl}${common}/cms/case`
  179. },
  180. caseDetail: { // 首页案场详情
  181. method: 'get',
  182. url: `${baseUrl}${common}/cms/case/:id`
  183. },
  184. addCase: { // 添加首页案场
  185. method: 'post',
  186. url: `${baseUrl}${common}/cms/case`
  187. },
  188. editCase: { // 添加首页案场
  189. method: 'put',
  190. url: `${baseUrl}${common}/cms/case/:id`
  191. },
  192. deleteCase: { // 添加首页案场
  193. method: 'delete',
  194. url: `${baseUrl}${common}/cms/case/:id`
  195. },
  196. info: { // 首页消息列表
  197. method: 'get',
  198. url: `${baseUrl}${common}/cms/info`
  199. },
  200. infoDetail: { // 首页消息详情
  201. method: 'get',
  202. url: `${baseUrl}${common}/cms/info/:id`
  203. },
  204. addInfo: { // 新增首页消息
  205. method: 'post',
  206. url: `${baseUrl}${common}/cms/info`
  207. },
  208. editInfo: { // 编辑首页消息
  209. method: 'put',
  210. url: `${baseUrl}${common}/cms/info/:id`
  211. },
  212. deleteInfo: { // 删除首页消息
  213. method: 'delete',
  214. url: `${baseUrl}${common}/cms/info/:id`
  215. },
  216. news: { // 咨询列表
  217. method: 'get',
  218. url: `${baseUrl}${common}/cms/news`
  219. },
  220. newsDetail: { // 咨询详情
  221. method: 'get',
  222. url: `${baseUrl}${common}/cms/news/:id`
  223. },
  224. addNews: { // 新增咨询
  225. method: 'post',
  226. url: `${baseUrl}${common}/cms/news`
  227. },
  228. editNews: { // 编辑咨询
  229. method: 'put',
  230. url: `${baseUrl}${common}/cms/news/:id`
  231. },
  232. deleteNews: { // 删除咨询
  233. method: 'delete',
  234. url: `${baseUrl}${common}/cms/news/:id`
  235. }
  236. },
  237. file: {
  238. image: { // 图片上传
  239. method: 'post',
  240. url: `${baseUrl}${common}/file`
  241. }
  242. },
  243. role: {
  244. list: {
  245. method: 'get',
  246. url: `${baseUrl}${common}/role`
  247. },
  248. info: {
  249. method: 'get',
  250. url: `${baseUrl}${common}/role/:id`
  251. },
  252. add: {
  253. method: 'post',
  254. url: `${baseUrl}${common}/role`
  255. },
  256. update: {
  257. method: 'put',
  258. url: `${baseUrl}${common}/role`
  259. },
  260. delete: {
  261. method: 'delete',
  262. url: `${baseUrl}${common}/role/:id`
  263. },
  264. },
  265. }
  266. export default $api