微信

api.js 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. const baseUrl = '/api'
  2. const wechat = '/wechat/:org'
  3. const guest = '/guest/:org'
  4. const common = '/common/: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. },
  28. caseForCoffee: {
  29. getCaseTableList: { // 获取案场桌位列表
  30. method: 'get',
  31. url: `${baseUrl}${guest}/cms/area`
  32. },
  33. getGoodsTypeList: { // 获取商品分类列表
  34. method: 'get',
  35. url: `${baseUrl}${guest}/type/goods`
  36. },
  37. getGoodsList: { // 获取商品列表
  38. method: 'get',
  39. url: `${baseUrl}${guest}/goods`
  40. },
  41. placeGoodsOrder: { // 商品下单
  42. method: 'post',
  43. url: `${baseUrl}${wechat}/order/goods`
  44. }
  45. },
  46. majorProjects: { // 项目专题
  47. getCourseList: { // 获取课程列表
  48. method: 'get',
  49. url: `${baseUrl}${guest}/cms/case/:id`
  50. },
  51. getCourseDetail: { // 获取课程详情
  52. method: 'get',
  53. url: `${baseUrl}${guest}/course/:id`
  54. },
  55. placeCourseOrder: { // 课程下单
  56. method: 'post',
  57. url: `${baseUrl}${wechat}/order/course`
  58. },
  59. },
  60. user: {
  61. info: { // 获取用户信息
  62. method: 'get',
  63. url: `${baseUrl}${wechat}/customer`
  64. },
  65. case: { // 获取案场及销售列表
  66. method: 'get',
  67. url: `${baseUrl}${guest}/case`
  68. },
  69. wxsignup: { // 绑定手机号
  70. method: 'post',
  71. url: `${baseUrl}${guest}/wxsignup`
  72. },
  73. captcha: { // 获取手机验证码
  74. method: 'get',
  75. url: `${baseUrl}${guest}/captcha`
  76. },
  77. getCaseList: { // 获取案场信息
  78. method: 'get',
  79. url: `${baseUrl}${guest}/case`
  80. },
  81. },
  82. login:{ // 主管、销售端登陆
  83. login: {
  84. method: 'post',
  85. url: `${baseUrl}${guest}/wxsignin`
  86. }
  87. }
  88. }
  89. export default $api