index.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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/index',
  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/zhongQiuQianDao',
  85. component: () => import('@/views/HomeView/AnswerGame/ZhongQiuQianDao.vue')
  86. },
  87. {
  88. path: '/home/festiveEvents/kaijiang',
  89. component: () => import('@/views/HomeView/AnswerGame/Kaijiang.vue')
  90. },
  91. {
  92. path: '/home/festiveEvents/answerGame',
  93. component: () => import('@/views/HomeView/AnswerGame/AnswerGame.vue')
  94. },
  95. {
  96. path: '/home/festiveEvents/qiXiGame',
  97. component: () => import('@/views/HomeView/AnswerGame/QiXiAnswerGame.vue')
  98. },
  99. {
  100. path: '/home/festiveEvents/lanternFestival',
  101. component: () => import('@/views/HomeView/AnswerGame/LanternFestival.vue')
  102. },
  103. {
  104. path: '/home/festiveEvents/drawCarouselGame',
  105. component: () => import('@/views/HomeView/DrawCarouselGame/DrawCarouselGame.vue')
  106. },
  107. {
  108. path: '/home/postInteract',
  109. component: () => import('@/views/HomeView/postInteract/list.vue')
  110. },
  111. {
  112. path: '/home/postInteract/detail',
  113. component: () => import('@/views/HomeView/postInteract/detail.vue')
  114. },
  115. ]
  116. },
  117. {
  118. path: '/rechargeAgreement',
  119. component: () => import('../views/RechargeAgreement.vue'),
  120. },
  121. {
  122. path: '/noticeCenter',
  123. component: () => import('../views/NoticeCenter.vue'),
  124. meta: {
  125. index: 2
  126. }
  127. },
  128. {
  129. path: '/myCenter',
  130. component: () => import('@/views/HomeView/MyCenter.vue'),
  131. meta: {
  132. index: 3
  133. }
  134. },
  135. {
  136. path: '/ipay',
  137. component: () => import('../views/Ipay.vue'),
  138. },
  139. {
  140. path: '/pointsRank',
  141. component: PointsRank,
  142. redirect:'/pointsRank/present',
  143. children: [
  144. {
  145. path: '/pointsRank/present',
  146. component: () => import('@/views/PointsRank/Present.vue')
  147. },
  148. {
  149. path: '/pointsRank/history',
  150. component: () => import('@/views/PointsRank/History.vue')
  151. },
  152. ]
  153. }
  154. ]
  155. const router = new VueRouter({
  156. mode: 'history',
  157. linkActiveClass:'route-active',
  158. routes,
  159. })
  160. export default router