api.js 15KB

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