api.js 17KB

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