微信

api.js 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. // const baseUrl = '/api-v2'
  2. const baseUrl = '/api'
  3. const wechat = '/wechat/:org'
  4. const guest = '/guest/:org'
  5. const common = '/common/:org'
  6. const $api = {
  7. index: { // 首页
  8. location: { // 获取5A
  9. method: 'get',
  10. url: `${baseUrl}${guest}/cms/location`
  11. },
  12. banner: { // 获取轮播图
  13. method: 'get',
  14. url: `${baseUrl}${guest}/cms/img`
  15. },
  16. message: { // 获取最新消息
  17. method: 'get',
  18. url: `${baseUrl}${guest}/cms/info`
  19. },
  20. project: { // 获取项目专题
  21. method: 'get',
  22. url: `${baseUrl}${guest}/cms/case`
  23. },
  24. cms: { // 获取cms消息
  25. method: 'get',
  26. url: `${baseUrl}${guest}/cms/news`
  27. },
  28. getFiveAList: { // 获取5A列表
  29. method: 'get',
  30. url: `${baseUrl}${guest}/cms/course`
  31. }
  32. },
  33. caseForCoffee: {
  34. getCaseTableList: { // 获取案场桌位列表
  35. method: 'get',
  36. url: `${baseUrl}${guest}/cms/area`
  37. },
  38. getGoodsTypeList: { // 获取商品分类列表
  39. method: 'get',
  40. url: `${baseUrl}${guest}/type/goods`
  41. },
  42. getGoodsList: { // 获取商品列表
  43. method: 'get',
  44. url: `${baseUrl}${guest}/goods`
  45. },
  46. placeGoodsOrder: { // 商品下单
  47. method: 'post',
  48. url: `${baseUrl}${wechat}/order/goods`
  49. },
  50. getCouponList: { // 获取优惠券列表
  51. method: 'get',
  52. url: `${baseUrl}${wechat}/customer/coupon`
  53. },
  54. getCouponInfo: { // 获取优惠券详情
  55. method: 'get',
  56. url: `${baseUrl}${wechat}/customer/coupon/:id`
  57. },
  58. },
  59. majorProjects: { // 项目专题
  60. getCourseList: { // 获取课程列表
  61. method: 'get',
  62. url: `${baseUrl}${guest}/cms/case/:id`
  63. },
  64. getCourseDetail: { // 获取课程详情
  65. method: 'get',
  66. url: `${baseUrl}${guest}/course/:id`
  67. },
  68. placeCourseOrder: { // 课程下单
  69. method: 'post',
  70. url: `${baseUrl}${wechat}/order/course`
  71. },
  72. },
  73. card: {
  74. myCustomer: { // 我的客户
  75. method: 'get',
  76. url: `${baseUrl}${wechat}/customer/user`
  77. },
  78. getCardList: { // 我的体验卡列表
  79. method: 'get',
  80. url: `${baseUrl}${wechat}/customer/card`
  81. },
  82. getCardInfo: { // 我的体验卡详情
  83. method: 'get',
  84. url: `${baseUrl}${wechat}/customer/card/:id`
  85. },
  86. },
  87. user: {
  88. info: { // 获取用户信息
  89. method: 'get',
  90. url: `${baseUrl}${wechat}/customer`
  91. },
  92. case: { // 获取案场及销售列表
  93. method: 'get',
  94. url: `${baseUrl}${guest}/case`
  95. },
  96. wxsignup: { // 绑定手机号
  97. method: 'post',
  98. url: `${baseUrl}${guest}/wxsignup`
  99. },
  100. captcha: { // 获取手机验证码
  101. method: 'get',
  102. url: `${baseUrl}${guest}/captcha`
  103. },
  104. getCaseList: { // 获取案场信息
  105. method: 'get',
  106. url: `${baseUrl}${guest}/case`
  107. },
  108. getCourseOrderList: { // 获取我的课程订单信息
  109. method: 'get',
  110. url: `${baseUrl}${wechat}/course/user`
  111. },
  112. getCourseLoactionList: { // 获取课程类型列表
  113. method: 'get',
  114. url: `${baseUrl}${guest}/cms/location`
  115. },
  116. getCourseOrderDetail: { // 获取课程订单详情
  117. method: 'get',
  118. url: `${baseUrl}${wechat}/course/user/:id`
  119. },
  120. gymCard: { // 获取健身卡列表
  121. method: 'get',
  122. url: `${baseUrl}${wechat}/gymcard`
  123. },
  124. gymCardDetail: { // 获取健身卡详情
  125. method: 'get',
  126. url: `${baseUrl}${wechat}/gymcard/:customerGymId`
  127. },
  128. },
  129. director: {
  130. getSales: { // 获取销售列表
  131. method: 'get',
  132. url: `${baseUrl}${wechat}/user/:type`
  133. },
  134. getForbidList: { // 获取禁用列表
  135. method: 'get',
  136. url: `${baseUrl}${wechat}/user/forbid`
  137. },
  138. putForbidOpen: { // 打开禁用状态
  139. method: 'post',
  140. url: `${baseUrl}${wechat}/user/forbid/:userid/:type`
  141. },
  142. putForbid:{ // 关闭禁用状态
  143. method: 'put',
  144. url: `${baseUrl}${wechat}/user/forbid/:userid/:type`
  145. },
  146. getSalesCardList: {
  147. method: 'get',
  148. url: `${baseUrl}${wechat}/user/detail/:id`
  149. }
  150. },
  151. login: { // 主管、销售端登陆
  152. login: {
  153. method: 'post',
  154. url: `${baseUrl}${guest}/wxsignin`
  155. }
  156. },
  157. case: {
  158. total: {
  159. method: 'get',
  160. url: `${baseUrl}${wechat}/goods/case/:caseid`
  161. },
  162. },
  163. goods: {
  164. getCustOrders: {
  165. method: 'get',
  166. url: `${baseUrl}${wechat}/goods/user`
  167. }
  168. },
  169. }
  170. export default $api