index.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import HomeView from '../views/HomeView.vue'
  4. import PointsRank from '../views/PointsRank.vue'
  5. Vue.use(VueRouter)
  6. const routes = [
  7. {
  8. path:'/',
  9. redirect:'/home',
  10. },
  11. {
  12. path: '/home',
  13. component: HomeView,
  14. redirect:'/home/pointsMall',
  15. children: [
  16. {
  17. path: '/home/index',
  18. component: () => import('@/views/HomeView/Index.vue'),
  19. meta: {
  20. index: 1
  21. }
  22. },
  23. {
  24. path: '/home/index/msgDetail',
  25. component: () => import('@/views/HomeView/MsgDetail.vue')
  26. },
  27. {
  28. path: '/home/signIn',
  29. component: () => import('@/views/HomeView/SignIn.vue')
  30. },
  31. {
  32. path: '/home/myMedal',
  33. component: () => import('@/views/HomeView/MyMedal.vue')
  34. },
  35. {
  36. path: '/home/commend',
  37. component: () => import('@/views/HomeView/Commend.vue')
  38. },
  39. {
  40. path: '/home/commend/commendDetail',
  41. component: () => import('@/views/HomeView/CommendDetail.vue')
  42. },
  43. {
  44. path: '/home/earnPoints',
  45. component: () => import('@/views/HomeView/EarnPoints.vue')
  46. },
  47. {
  48. path: '/home/citeList',
  49. component: () => import('@/views/HomeView/CiteList.vue')
  50. },
  51. {
  52. path: '/home/pointsMall',
  53. component: () => import('@/views/HomeView/PointsMall.vue')
  54. },
  55. {
  56. path: '/home/pointsMall/redeem',
  57. component: () => import('@/views/HomeView/RedeemView.vue')
  58. },
  59. {
  60. path: '/home/myCenter/goodsDetail',
  61. component: () => import('@/views/HomeView/GoodsDetail.vue')
  62. },
  63. {
  64. path: '/home/pointsMall/goodDetail',
  65. component: () => import('@/views/HomeView/GoodDetail.vue')
  66. },
  67. {
  68. path: '/home/welfareList',
  69. component: () => import('@/views/HomeView/WelfareList.vue')
  70. },
  71. {
  72. path: '/home/myCenter',
  73. component: () => import('@/views/HomeView/MyCenter.vue')
  74. },
  75. {
  76. path: '/home/festiveEvents',
  77. component: () => import('@/views/HomeView/FestiveEvents.vue')
  78. },
  79. {
  80. path: '/home/festiveEvents/game',
  81. component: () => import('@/views/HomeView/Game.vue')
  82. },
  83. {
  84. path: '/home/festiveEvents/answerGame',
  85. component: () => import('@/views/HomeView/AnswerGame/AnswerGame.vue')
  86. },
  87. {
  88. path: '/home/festiveEvents/qiXiGame',
  89. component: () => import('@/views/HomeView/AnswerGame/QiXiAnswerGame.vue')
  90. },
  91. {
  92. path: '/home/festiveEvents/drawCarouselGame',
  93. component: () => import('@/views/HomeView/DrawCarouselGame/DrawCarouselGame.vue')
  94. },
  95. ]
  96. },
  97. {
  98. path: '/noticeCenter',
  99. component: () => import('../views/NoticeCenter.vue'),
  100. meta: {
  101. index: 2
  102. }
  103. },
  104. {
  105. path: '/pointsRank',
  106. component: PointsRank,
  107. redirect:'/pointsRank/present',
  108. children: [
  109. {
  110. path: '/pointsRank/present',
  111. component: () => import('@/views/PointsRank/Present.vue')
  112. },
  113. {
  114. path: '/pointsRank/history',
  115. component: () => import('@/views/PointsRank/History.vue')
  116. },
  117. ]
  118. }
  119. ]
  120. const router = new VueRouter({
  121. linkActiveClass:'route-active',
  122. routes,
  123. })
  124. export default router