微信

api.js 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. const baseUrl = '/api-v2'
  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. majorProjects: { // 项目专题
  29. getCourseList: { // 获取课程列表
  30. method: 'get',
  31. url: `${baseUrl}${guest}/cms/case/:id`
  32. },
  33. getCourseDetail: { // 获取课程详情
  34. method: 'get',
  35. url: `${baseUrl}${guest}/course/:id`
  36. },
  37. },
  38. user: {
  39. info: { // 获取用户信息
  40. method: 'get',
  41. url: `${baseUrl}${wechat}/customer`
  42. },
  43. case: { // 获取案场及销售列表
  44. method: 'get',
  45. url: `${baseUrl}${guest}/case`
  46. },
  47. wxsignup: { // 绑定手机号
  48. method: 'post',
  49. url: `${baseUrl}${guest}/wxsignup`
  50. },
  51. captcha: { // 获取手机验证码
  52. method: 'get',
  53. url: `${baseUrl}${guest}/captcha`
  54. }
  55. },
  56. login:{ // 主管、销售端登陆
  57. login: {
  58. method: 'post',
  59. url: `${baseUrl}${guest}/wxsignin`
  60. }
  61. }
  62. }
  63. export default $api