api.js 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. const baseUrl = '/api-v2'
  2. const common = '/common/:org'
  3. const guest = '/guest/:org'
  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. signout: { // 登出
  17. method: 'post',
  18. url: `${baseUrl}${common}/signout`
  19. },
  20. editPassword: { // 修改密码
  21. method: 'put',
  22. url: `${baseUrl}${common}/user/:id/password`
  23. },
  24. },
  25. systemSet: {
  26. getUserList: { // 获取用户列表
  27. method: 'get',
  28. url: `${baseUrl}${common}/user`
  29. },
  30. getUserInfo: { // 获取用户信息
  31. method: 'get',
  32. url: `${baseUrl}${common}/user/:id`
  33. },
  34. addUser: { // 新增用户
  35. method: 'post',
  36. url: `${baseUrl}${common}/user`
  37. },
  38. editUser: { // 更新用户
  39. method: 'put',
  40. url: `${baseUrl}${common}/user`
  41. },
  42. deleteUser: { // 删除用户
  43. method: 'delete',
  44. url: `${baseUrl}${common}/user/:id`
  45. },
  46. resetPassword: { // 重置用户密码
  47. method: 'put',
  48. url: `${baseUrl}${common}/user/password/reset`
  49. },
  50. bindRoles: { // 绑定角色
  51. method: 'put',
  52. url: `${baseUrl}${common}/userrole`
  53. },
  54. getUserRoles: { // 获取用户绑定角色
  55. method: 'get',
  56. url: `${baseUrl}${common}/userrole`
  57. },
  58. },
  59. channelManager: {
  60. getChannelList: { // 渠道列表
  61. method: 'get',
  62. url: `${baseUrl}${common}/channel`
  63. },
  64. getChannelInfo: { // 获取渠道信息
  65. method: 'get',
  66. url: `${baseUrl}${common}/channel/:channelId`
  67. },
  68. addChannel: { // 新增渠道
  69. method: 'post',
  70. url: `${baseUrl}${common}/channel`
  71. },
  72. editChannel: { // 更新渠道
  73. method: 'put',
  74. url: `${baseUrl}${common}/channel`
  75. },
  76. deleteChannel: { // 删除渠道
  77. method: 'delete',
  78. url: `${baseUrl}${common}/channel/:channelId`
  79. },
  80. },
  81. caseManager: {
  82. getRolesList: { // 获取角色列表
  83. method: 'get',
  84. url: `${baseUrl}${common}/role`
  85. },
  86. getCaseList: { // 获取案场列表
  87. method: 'get',
  88. url: `${baseUrl}${common}/case/info`
  89. },
  90. addCase: { // 新增案场
  91. method: 'post',
  92. url: `${baseUrl}${common}/case/info`
  93. },
  94. getCaseInfo: { // 查询案场
  95. method: 'get',
  96. url: `${baseUrl}${common}/case/info/:id`
  97. },
  98. editCase: { // 编辑案场
  99. method: 'put',
  100. url: `${baseUrl}${common}/case/info/:id`
  101. },
  102. getCaseUserType: { // 获取案场相关人员类型
  103. method: 'get',
  104. url: `${baseUrl}${common}/case/usertype`
  105. },
  106. getCaseUserList: { // 获取案场相关人员列表
  107. method: 'get',
  108. url: `${baseUrl}${common}/case/user`
  109. },
  110. getCaseUserInfo: { // 获取案场相关人员信息
  111. method: 'get',
  112. url: `${baseUrl}${common}/case/user/:id`
  113. },
  114. addCaseUser: { // 新增案场相关人员
  115. method: 'post',
  116. url: `${baseUrl}${common}/case/user`
  117. },
  118. editCaseUser: { // 更新案场相关人员
  119. method: 'put',
  120. url: `${baseUrl}${common}/case/user`
  121. },
  122. getKeyList: { // 获取钥匙列表
  123. method: 'get',
  124. url: `${baseUrl}${common}/case/key`
  125. },
  126. addKey: { // 新增钥匙
  127. method: 'post',
  128. url: `${baseUrl}${common}/case/key`
  129. },
  130. cancelKey: { // 取消钥匙
  131. method: 'put',
  132. url: `${baseUrl}${common}/case/unlock/:id`
  133. },
  134. deleteKey: { // 删除钥匙
  135. method: 'delete',
  136. url: `${baseUrl}${common}/case/key/:id`
  137. },
  138. getCaseAreaList: { // 获取案场区域列表
  139. method: 'get',
  140. url: `${baseUrl}${common}/case/area`
  141. },
  142. addCaseArea: { // 新增案场区域
  143. method: 'post',
  144. url: `${baseUrl}${common}/case/area`
  145. },
  146. deleteCaseArea: { // 删除案场区域
  147. method: 'delete',
  148. url: `${baseUrl}${common}/case/area/:id`
  149. },
  150. getCaseAreaInfo: { // 获取案场区域信息
  151. method: 'get',
  152. url: `${baseUrl}${common}/case/area/:id`
  153. },
  154. editCaseArea: { // 更新案场区域信息
  155. method: 'put',
  156. url: `${baseUrl}${common}/case/area`
  157. },
  158. getCaseTableList: { // 获取案场桌位列表
  159. method: 'get',
  160. url: `${baseUrl}${common}/case/table`
  161. },
  162. addCaseTable: { // 新增案场桌位
  163. method: 'post',
  164. url: `${baseUrl}${common}/case/table`
  165. },
  166. getCaseTableInfo: { // 查询案场桌位信息
  167. method: 'get',
  168. url: `${baseUrl}${common}/case/table/:id`
  169. },
  170. editCaseTable: { // 更新案场桌位信息
  171. method: 'put',
  172. url: `${baseUrl}${common}/case/table`
  173. },
  174. deleteCaseTable: { // 删除案场桌位信息
  175. method: 'delete',
  176. url: `${baseUrl}${common}/case/table/:id`
  177. },
  178. getCaseTagList: { // 获取案场标签列表
  179. method: 'get',
  180. url: `${baseUrl}${common}/case/tag`
  181. },
  182. addCaseTag: { // 新增案场标签
  183. method: 'post',
  184. url: `${baseUrl}${common}/case/tag`
  185. },
  186. getTagInfo: { // 获取案场标签信息
  187. method: 'get',
  188. url: `${baseUrl}${common}/case/tag/:id`
  189. },
  190. deleteCaseTag: { // 删除案场标签
  191. method: 'delete',
  192. url: `${baseUrl}${common}/case/tag/:id`
  193. },
  194. getUserTypeList: { // 获取用户类型列表
  195. method: 'get',
  196. url: `${baseUrl}${common}/usertype`
  197. },
  198. getRecordList: {
  199. method: 'get',
  200. url: `${baseUrl}${common}/case/record`
  201. },
  202. addRecord: {
  203. method: 'post',
  204. url: `${baseUrl}${common}/case/record`
  205. },
  206. },
  207. goodsManager: {
  208. getGoodsSpecList: { // 商品规格列表
  209. method: 'get',
  210. url: `${baseUrl}${common}/spec/goods`
  211. },
  212. addGoodsSpec: { // 新增商品规格
  213. method: 'post',
  214. url: `${baseUrl}${common}/spec/goods`
  215. },
  216. getGoodsSpecById: { // 根据id获取商品规格
  217. method: 'get',
  218. url: `${baseUrl}${common}/spec/goods/:id`
  219. },
  220. editGoodsSpec: { // 编辑商品规格
  221. method: 'put',
  222. url: `${baseUrl}${common}/spec/goods/:id`
  223. },
  224. deleteGoodsSpec: { // 删除商品规格
  225. method: 'delete',
  226. url: `${baseUrl}${common}/spec/goods/:id`
  227. },
  228. getGoodsTypeList: { // 商品种类列表
  229. method: 'get',
  230. url: `${baseUrl}${common}/type/goods`
  231. },
  232. addGoodsType: { // 新增商品种类
  233. method: 'post',
  234. url: `${baseUrl}${common}/type/goods`
  235. },
  236. getGoodsTypeById: { // 根据id获取商品种类
  237. method: 'get',
  238. url: `${baseUrl}${common}/type/goods/:id`
  239. },
  240. editGoodsType: { // 编辑商品种类
  241. method: 'put',
  242. url: `${baseUrl}${common}/type/goods/:id`
  243. },
  244. deleteGoodsType: { // 删除商品种类
  245. method: 'delete',
  246. url: `${baseUrl}${common}/type/goods/:id`
  247. },
  248. getGoodsList: {
  249. method: 'get',
  250. url: `${baseUrl}${common}/goods`
  251. },
  252. getGoodsByID: {
  253. method: 'get',
  254. url: `${baseUrl}${common}/goods/:id`
  255. },
  256. addGoods: {
  257. method: 'post',
  258. url: `${baseUrl}${common}/goods`
  259. },
  260. updateGoods: {
  261. method: 'put',
  262. url: `${baseUrl}${common}/goods/:id`
  263. },
  264. deleteGoods: {
  265. method: 'delete',
  266. url: `${baseUrl}${common}/goods/:id`
  267. },
  268. },
  269. cms: {
  270. location: { // 图片位置(5A)
  271. method: 'get',
  272. url: `${baseUrl}${common}/cms/location`
  273. },
  274. locationDetail: { // 5A详情
  275. method: 'get',
  276. url: `${baseUrl}${common}/cms/location/:id`
  277. },
  278. addLocation: { // 添加5A
  279. method: 'post',
  280. url: `${baseUrl}${common}/cms/location`
  281. },
  282. editLocation: { // 编辑5A
  283. method: 'put',
  284. url: `${baseUrl}${common}/cms/location/:id`
  285. },
  286. deleteLocation: { // 删除5A
  287. method: 'delete',
  288. url: `${baseUrl}${common}/cms/location/:id`
  289. },
  290. orderChange: {
  291. method: 'put',
  292. url: `${baseUrl}${common}/cms/location/:id/sort`
  293. },
  294. imageList: { // 轮播图列表
  295. method: 'get',
  296. url: `${baseUrl}${common}/cms/image`
  297. },
  298. imageDetail: { // 轮播图详情
  299. method: 'get',
  300. url: `${baseUrl}${common}/cms/image/:id`
  301. },
  302. addImage: { // 添加轮播图
  303. method: 'post',
  304. url: `${baseUrl}${common}/cms/image`
  305. },
  306. editImage: { // 编辑轮播图
  307. method: 'put',
  308. url: `${baseUrl}${common}/cms/image/:id`
  309. },
  310. deleteDetail: { // 删除轮播图
  311. method: 'delete',
  312. url: `${baseUrl}${common}/cms/image/:id`
  313. },
  314. case: { // 首页案场列表
  315. method: 'get',
  316. url: `${baseUrl}${common}/cms/case`
  317. },
  318. caseDetail: { // 首页案场详情
  319. method: 'get',
  320. url: `${baseUrl}${common}/cms/case/:id`
  321. },
  322. addCase: { // 添加首页案场
  323. method: 'post',
  324. url: `${baseUrl}${common}/cms/case`
  325. },
  326. editCase: { // 添加首页案场
  327. method: 'put',
  328. url: `${baseUrl}${common}/cms/case/:id`
  329. },
  330. deleteCase: { // 添加首页案场
  331. method: 'delete',
  332. url: `${baseUrl}${common}/cms/case/:id`
  333. },
  334. info: { // 首页消息列表
  335. method: 'get',
  336. url: `${baseUrl}${common}/cms/info`
  337. },
  338. infoDetail: { // 首页消息详情
  339. method: 'get',
  340. url: `${baseUrl}${common}/cms/info/:id`
  341. },
  342. addInfo: { // 新增首页消息
  343. method: 'post',
  344. url: `${baseUrl}${common}/cms/info`
  345. },
  346. editInfo: { // 编辑首页消息
  347. method: 'put',
  348. url: `${baseUrl}${common}/cms/info/:id`
  349. },
  350. deleteInfo: { // 删除首页消息
  351. method: 'delete',
  352. url: `${baseUrl}${common}/cms/info/:id`
  353. },
  354. news: { // 资讯列表
  355. method: 'get',
  356. url: `${baseUrl}${common}/cms/news`
  357. },
  358. newsDetail: { // 资讯详情
  359. method: 'get',
  360. url: `${baseUrl}${common}/cms/news/:id`
  361. },
  362. addNews: { // 新增资讯
  363. method: 'post',
  364. url: `${baseUrl}${common}/cms/news`
  365. },
  366. editNews: { // 编辑资讯
  367. method: 'put',
  368. url: `${baseUrl}${common}/cms/news/:id`
  369. },
  370. deleteNews: { // 删除资讯
  371. method: 'delete',
  372. url: `${baseUrl}${common}/cms/news/:id`
  373. },
  374. caseShow: { // 前台展示
  375. method: 'put',
  376. url: `${baseUrl}${common}/cms/caseshow/:id`
  377. },
  378. caseHide: { // 取消前台展示
  379. method: 'put',
  380. url: `${baseUrl}${common}/cms/casehide/:id`
  381. }
  382. },
  383. file: {
  384. image: { // 图片上传
  385. method: 'post',
  386. url: `${baseUrl}${common}/file`
  387. }
  388. },
  389. role: {
  390. list: {
  391. method: 'get',
  392. url: `${baseUrl}${common}/role`
  393. },
  394. info: {
  395. method: 'get',
  396. url: `${baseUrl}${common}/role/:id`
  397. },
  398. add: {
  399. method: 'post',
  400. url: `${baseUrl}${common}/role`
  401. },
  402. update: {
  403. method: 'put',
  404. url: `${baseUrl}${common}/role`
  405. },
  406. delete: {
  407. method: 'delete',
  408. url: `${baseUrl}${common}/role/:id`
  409. },
  410. getmenus: {
  411. method: 'get',
  412. url: `${baseUrl}${common}/rolemenu/:id`
  413. },
  414. savemenu: {
  415. method: 'put',
  416. url: `${baseUrl}${common}/rolemenu/:id`
  417. },
  418. },
  419. dataStatistics: {
  420. getCustomerList: { // 获取会员列表
  421. method: 'get',
  422. url: `${baseUrl}${common}/customer`
  423. }
  424. },
  425. device: {
  426. list: {
  427. method: 'get',
  428. url: `${baseUrl}${common}/case/equipment`
  429. },
  430. info: {
  431. method: 'get',
  432. url: `${baseUrl}${common}/case/equipment/:id`
  433. },
  434. add: {
  435. method: 'post',
  436. url: `${baseUrl}${common}/case/equipment`
  437. },
  438. update: {
  439. method: 'put',
  440. url: `${baseUrl}${common}/case/equipment`
  441. },
  442. delete: {
  443. method: 'delete',
  444. url: `${baseUrl}${common}/case/equipment/:id`
  445. },
  446. },
  447. course: {
  448. list: {
  449. method: 'get',
  450. url: `${baseUrl}${common}/course`
  451. },
  452. info: {
  453. method: 'get',
  454. url: `${baseUrl}${common}/course/:id`
  455. },
  456. tags: {
  457. method: 'get',
  458. url: `${baseUrl}${common}/coursetag`
  459. },
  460. add: {
  461. method: 'post',
  462. url: `${baseUrl}${common}/course`
  463. },
  464. update: {
  465. method: 'put',
  466. url: `${baseUrl}${common}/course`
  467. },
  468. delete: {
  469. method: 'delete',
  470. url: `${baseUrl}${common}/course/:id`
  471. },
  472. public: {
  473. method: 'put',
  474. url: `${baseUrl}${common}/course/:id/public`
  475. },
  476. unpublic: {
  477. method: 'put',
  478. url: `${baseUrl}${common}/course/:id/unpublic`
  479. },
  480. getimgs: {
  481. method: 'get',
  482. url: `${baseUrl}${common}/courseimg/:id`
  483. },
  484. addimgs: {
  485. method: 'post',
  486. url: `${baseUrl}${common}/courseimg`
  487. },
  488. updateimgs: {
  489. method: 'put',
  490. url: `${baseUrl}${common}/courseimg`
  491. },
  492. deleteimgs: {
  493. method: 'delete',
  494. url: `${baseUrl}${common}/courseimg/:id`
  495. },
  496. schedule: {
  497. method: 'get',
  498. url: `${baseUrl}${common}/schedule`
  499. },
  500. detail: {
  501. method: 'get',
  502. url: `${baseUrl}${common}/detail`
  503. },
  504. getDetailByID: {
  505. method: 'get',
  506. url: `${baseUrl}${common}/detail/:id`
  507. },
  508. addDetail: {
  509. method: 'post',
  510. url: `${baseUrl}${common}/detail`
  511. },
  512. updateDetail: {
  513. method: 'put',
  514. url: `${baseUrl}${common}/detail`
  515. },
  516. delDetail: {
  517. method: 'delete',
  518. url: `${baseUrl}${common}/detail/:id`
  519. },
  520. },
  521. verification: {
  522. coursebycode: {
  523. method: 'get',
  524. url: `${baseUrl}${common}/verify/course/code/:id`
  525. },
  526. coursebytel: {
  527. method: 'get',
  528. url: `${baseUrl}${common}/verify/course/tel/:tel`
  529. },
  530. courseverify: {
  531. method: 'put',
  532. url: `${baseUrl}${common}/verify/course/:id`
  533. },
  534. },
  535. goodsOrder: {
  536. getOnlineOrder: {
  537. method: 'get',
  538. url: `${baseUrl}${common}/order/online/goods`
  539. },
  540. getOrdersByRecord: {
  541. method: 'get',
  542. url: `${baseUrl}${common}/order/goods/record/:id`
  543. },
  544. },
  545. cardManager: {
  546. viplist: {
  547. method: 'get',
  548. url: `${baseUrl}${common}/vipcard`
  549. },
  550. vipadd: {
  551. method: 'post',
  552. url: `${baseUrl}${common}/vipcard`
  553. },
  554. vipcharge: {
  555. method: 'put',
  556. url: `${baseUrl}${common}/vipcard/:code`
  557. },
  558. },
  559. }
  560. export default $api