微信

api.js 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. // const baseUrl = '/api-v2'
  2. const baseUrl = '/api'
  3. const wechat = '/wechat/:org'
  4. const guest = '/guest/:org'
  5. const $api = {
  6. index: { // 首页
  7. location: { // 获取5A
  8. method: 'get',
  9. url: `${baseUrl}${guest}/cms/location`
  10. },
  11. banner: { // 获取轮播图
  12. method: 'get',
  13. url: `${baseUrl}${guest}/cms/img`
  14. },
  15. message: { // 获取最新消息
  16. method: 'get',
  17. url: `${baseUrl}${guest}/cms/info`
  18. },
  19. project: { // 获取项目专题
  20. method: 'get',
  21. url: `${baseUrl}${guest}/cms/case`
  22. },
  23. cms: { // 获取cms消息
  24. method: 'get',
  25. url: `${baseUrl}${guest}/cms/news`
  26. },
  27. getFiveAList: { // 获取5A列表
  28. method: 'get',
  29. url: `${baseUrl}${guest}/cms/course`
  30. },
  31. locationDetails: {
  32. method: 'get',
  33. url: `${baseUrl}${guest}/cms/location/detail`
  34. },
  35. },
  36. caseForCoffee: {
  37. getCaseTableList: { // 获取案场桌位列表
  38. method: 'get',
  39. url: `${baseUrl}${guest}/cms/area`
  40. },
  41. getGoodsTypeList: { // 获取商品分类列表
  42. method: 'get',
  43. url: `${baseUrl}${guest}/type/goods`
  44. },
  45. getGoodsList: { // 获取商品列表
  46. method: 'get',
  47. url: `${baseUrl}${guest}/goods`
  48. },
  49. placeGoodsOrder: { // 商品下单
  50. method: 'post',
  51. url: `${baseUrl}${wechat}/order/goods`
  52. },
  53. getCouponList: { // 获取优惠券列表
  54. method: 'get',
  55. url: `${baseUrl}${wechat}/customer/coupon`
  56. },
  57. getCouponInfo: { // 获取优惠券详情
  58. method: 'get',
  59. url: `${baseUrl}${wechat}/customer/coupon/:id`
  60. },
  61. },
  62. majorProjects: { // 项目专题
  63. getCourseList: { // 获取课程列表
  64. method: 'get',
  65. url: `${baseUrl}${guest}/cms/case/:id`
  66. },
  67. getCourseDetail: { // 获取课程详情
  68. method: 'get',
  69. url: `${baseUrl}${guest}/course/:id`
  70. },
  71. placeCourseOrder: { // 课程下单
  72. method: 'post',
  73. url: `${baseUrl}${wechat}/order/course`
  74. },
  75. },
  76. card: {
  77. myCustomer: { // 我的客户
  78. method: 'get',
  79. url: `${baseUrl}${wechat}/customer/user`
  80. },
  81. getCardList: { // 我的体验卡列表
  82. method: 'get',
  83. url: `${baseUrl}${wechat}/customer/card`
  84. },
  85. getCardInfo: { // 我的体验卡详情
  86. method: 'get',
  87. url: `${baseUrl}${wechat}/customer/card/:id`
  88. },
  89. },
  90. user: {
  91. info: { // 获取用户信息
  92. method: 'get',
  93. url: `${baseUrl}${wechat}/customer`
  94. },
  95. case: { // 获取案场及销售列表
  96. method: 'get',
  97. url: `${baseUrl}${guest}/case`
  98. },
  99. wxsignup: { // 绑定手机号
  100. method: 'post',
  101. url: `${baseUrl}${guest}/wxsignup`
  102. },
  103. captcha: { // 获取手机验证码
  104. method: 'get',
  105. url: `${baseUrl}${guest}/captcha`
  106. },
  107. recommendCode: { // 验证推荐码
  108. method: 'get',
  109. url: `${baseUrl}${guest}/customerremark/:recommendCode`
  110. },
  111. getCaseList: { // 获取案场信息
  112. method: 'get',
  113. url: `${baseUrl}${guest}/case`
  114. },
  115. getCourseOrderList: { // 获取我的课程订单信息
  116. method: 'get',
  117. url: `${baseUrl}${wechat}/course/user`
  118. },
  119. getCourseLoactionList: { // 获取课程类型列表
  120. method: 'get',
  121. url: `${baseUrl}${guest}/cms/location`
  122. },
  123. getCourseOrderDetail: { // 获取课程订单详情
  124. method: 'get',
  125. url: `${baseUrl}${wechat}/course/user/:id`
  126. },
  127. gymCard: { // 获取健身卡列表
  128. method: 'get',
  129. url: `${baseUrl}${wechat}/gymcard`
  130. },
  131. gymCardDetail: { // 获取健身卡详情
  132. method: 'get',
  133. url: `${baseUrl}${wechat}/gymcard/:customerGymId`
  134. },
  135. getNum: { // 获取卡券数
  136. method: 'get',
  137. url: `${baseUrl}${wechat}/customer/info`
  138. },
  139. getVip: { // vip卡详情
  140. method: 'get',
  141. url: `${baseUrl}${wechat}/vip`
  142. }
  143. },
  144. director: {
  145. getSales: { // 获取销售列表
  146. method: 'get',
  147. url: `${baseUrl}${wechat}/user/:type`
  148. },
  149. getForbidList: { // 获取禁用列表
  150. method: 'get',
  151. url: `${baseUrl}${wechat}/user/forbid`
  152. },
  153. putForbidOpen: { // 打开禁用状态
  154. method: 'post',
  155. url: `${baseUrl}${wechat}/user/forbid/:userid/:type`
  156. },
  157. putForbid: { // 关闭禁用状态
  158. method: 'put',
  159. url: `${baseUrl}${wechat}/user/forbid/:userid/:type`
  160. },
  161. getSalesCardList: { // 获取销售发卡详情
  162. method: 'get',
  163. url: `${baseUrl}${wechat}/user/detail/:id`
  164. },
  165. getCardNum: {
  166. method: 'get',
  167. url: `${baseUrl}${wechat}/card/detail/:id`
  168. },
  169. getCouponNum: {
  170. method: 'get',
  171. url: `${baseUrl}${wechat}/coupon/detail/:id`
  172. },
  173. },
  174. sales: {
  175. getCardList: { // 获取我的卡列表
  176. method: 'get',
  177. url: `${baseUrl}${wechat}/card`
  178. },
  179. getCouponList: { // 获取我的券列表
  180. method: 'get',
  181. url: `${baseUrl}${wechat}/coupon`
  182. },
  183. getForbidInfo: { // 获取用户禁用信息
  184. method: 'get',
  185. url: `${baseUrl}${wechat}/user/forbid`
  186. },
  187. getCustomerList: { // 获取客户列表
  188. method: 'get',
  189. url: `${baseUrl}${wechat}/customer/user`
  190. },
  191. getCustomerCardList: { // 获取我的用户领取卡信息
  192. method: 'get',
  193. url: `${baseUrl}${wechat}/customer/sales/card/:id`
  194. },
  195. getCustomerCouponList: { // 获取我的用户领取券信息
  196. method: 'get',
  197. url: `${baseUrl}${wechat}/customer/sales/coupon/:id`
  198. },
  199. },
  200. login: { // 主管、销售端登陆
  201. login: {
  202. method: 'post',
  203. url: `${baseUrl}${guest}/wxsignin`
  204. }
  205. },
  206. case: {
  207. total: {
  208. method: 'get',
  209. url: `${baseUrl}${wechat}/goods/case/:caseid`
  210. },
  211. conf: {
  212. method: 'get',
  213. url: `${baseUrl}${wechat}/case/conf/:caseid`
  214. },
  215. },
  216. goods: {
  217. getCustOrders: {
  218. method: 'get',
  219. url: `${baseUrl}${wechat}/goods/user`
  220. }
  221. },
  222. share: {
  223. share: {
  224. method: 'get',
  225. url: `${baseUrl}${guest}/wechat/jssdk/signature`
  226. },
  227. card: {
  228. method: 'get',
  229. url: `${baseUrl}${wechat}/card/:id`
  230. },
  231. coupon: {
  232. method: 'get',
  233. url: `${baseUrl}${wechat}/coupon/:id`
  234. },
  235. setCard: {
  236. method: 'post',
  237. url: `${baseUrl}${wechat}/card/:id`
  238. },
  239. setCoupon: {
  240. method: 'post',
  241. url: `${baseUrl}${wechat}/coupon/:id`
  242. },
  243. setChannelCard: {
  244. method: 'post',
  245. url: `${baseUrl}${wechat}/channel/card/:id`
  246. },
  247. setChannelCoupon: {
  248. method: 'post',
  249. url: `${baseUrl}${wechat}/channel/coupon/:id`
  250. }
  251. },
  252. bodyCheck: {
  253. bodyCheck: {
  254. method: 'get',
  255. url: `${baseUrl}${wechat}/GetCheckByUser`
  256. }
  257. },
  258. remark:{
  259. setRemark: {
  260. method: 'post',
  261. url: `${baseUrl}${wechat}/customerremark`
  262. },
  263. getRemark: {
  264. method: 'get',
  265. url: `${baseUrl}${wechat}/customerremark/:salesId/:customerId`
  266. }
  267. },
  268. rush:{
  269. setRush: {
  270. method: 'post',
  271. url: `${baseUrl}${wechat}/customerremark`
  272. },
  273. getRush: {
  274. method: 'get',
  275. url: `${baseUrl}${wechat}/customerremark`
  276. }
  277. }
  278. }
  279. export default $api