index.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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/yuanXiaoQianDao',
  85. component: () => import('@/views/HomeView/AnswerGame/YuanXiaoQianDao.vue')
  86. },
  87. {
  88. path: '/home/festiveEvents/yuanDanQianDao',
  89. component: () => import('@/views/HomeView/AnswerGame/YuanDanQianDao.vue')
  90. },
  91. {
  92. path: '/home/festiveEvents/siQingRiQianDao',
  93. component: () => import('@/views/HomeView/AnswerGame/SiQingRiQianDao.vue')
  94. },
  95. {
  96. path: '/home/festiveEvents/shuangShiYiQianDao',
  97. component: () => import('@/views/HomeView/AnswerGame/ShuangShiYIQianDao.vue')
  98. },
  99. {
  100. path: '/home/festiveEvents/guoQingQianDao',
  101. component: () => import('@/views/HomeView/AnswerGame/GuoQingQianDao.vue')
  102. },
  103. {
  104. path: '/home/festiveEvents/zhongQiuQianDao',
  105. component: () => import('@/views/HomeView/AnswerGame/ZhongQiuQianDao.vue')
  106. },
  107. {
  108. path: '/home/festiveEvents/kaijiangSpecial',
  109. component: () => import('@/views/HomeView/AnswerGame/KaijiangSpecial.vue')
  110. },
  111. {
  112. path: '/home/festiveEvents/weekKaijiang',
  113. component: () => import('@/views/HomeView/AnswerGame/WeekKaijiang.vue')
  114. },
  115. {
  116. path: '/home/festiveEvents/answerGame',
  117. component: () => import('@/views/HomeView/AnswerGame/AnswerGame.vue')
  118. },
  119. {
  120. path: '/home/festiveEvents/qiXiGame',
  121. component: () => import('@/views/HomeView/AnswerGame/QiXiAnswerGame.vue')
  122. },
  123. {
  124. path: '/home/festiveEvents/lanternFestival',
  125. component: () => import('@/views/HomeView/AnswerGame/LanternFestival.vue')
  126. },
  127. {
  128. path: '/home/festiveEvents/wuYiDaTi',
  129. component: () => import('@/views/HomeView/AnswerGame/WuYiDaTi.vue')
  130. },
  131. {
  132. path: '/home/festiveEvents/drawCarouselGame',
  133. component: () => import('@/views/HomeView/DrawCarouselGame/DrawCarouselGame.vue')
  134. },
  135. {
  136. path: '/home/postInteract',
  137. component: () => import('@/views/HomeView/postInteract/list.vue')
  138. },
  139. {
  140. path: '/home/postInteract/detail',
  141. component: () => import('@/views/HomeView/postInteract/detail.vue')
  142. },
  143. ]
  144. },
  145. {
  146. path: '/noticeCenter',
  147. component: () => import('../views/NoticeCenter.vue'),
  148. meta: {
  149. index: 2
  150. }
  151. },
  152. {
  153. path: '/myCenter',
  154. component: () => import('@/views/HomeView/MyCenter.vue'),
  155. meta: {
  156. index: 3
  157. }
  158. },
  159. {
  160. path: '/myCenter/goodsDetail',
  161. component: () => import('@/views/HomeView/GoodsDetail.vue')
  162. },
  163. {
  164. path: '/ipay',
  165. component: () => import('../views/Ipay.vue'),
  166. },
  167. {
  168. path: '/pointsRank',
  169. component: PointsRank,
  170. redirect:'/pointsRank/present',
  171. children: [
  172. {
  173. path: '/pointsRank/present',
  174. component: () => import('@/views/PointsRank/Present.vue')
  175. },
  176. {
  177. path: '/pointsRank/history',
  178. component: () => import('@/views/PointsRank/History.vue')
  179. },
  180. ]
  181. }
  182. ]
  183. const router = new VueRouter({
  184. // mode: 'history',
  185. linkActiveClass:'route-active',
  186. routes,
  187. })
  188. export default router