微信

router.js 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import mainPage from './mainPage/index' // 主页
  4. import indexPage from './mainPage/indexPage/index' // 首页
  5. import fiveA from './fiveA/index' // 5A
  6. import majorProjects from './majorProjects/index' // 项目专题
  7. import majorProjectsList from './majorProjectsList/index' // 项目专题列表
  8. import majorProjectsDetail from './majorProjectsDetail/index' // 项目专题详情
  9. import placeOrderForCourse from './placeOrderForCourse/index' // 购买课程下单
  10. import coffeeIndex from './mainPage/coffeeIndex/index' // 城咖啡
  11. import placeOrder from './placeOrder/index' // 城咖啡-点单
  12. import placeOrderDetail from './placeOrderDetail/index' // 城咖啡-点单详情
  13. import orderList from './orderList/index' // 城咖啡-点单列表
  14. import libraryIndex from './mainPage/libraryIndex/index' // 图书馆首页
  15. import userCenter from './mainPage/userCenter/index' // 个人中心
  16. import bindMobile from './bindMobile/bindMobile' // 绑定手机号
  17. import lessonOrder from './lessonOrder/index' // 我的订单
  18. import vip from './vip/index' // vip卡说明
  19. import vipDetail from './vipDetail/index' // vip卡说明
  20. import card from './card/index' // 卡
  21. import coupons from './coupons/index' // 优惠券
  22. import courseList from './courseList/index' // 课程列表
  23. import lessonDetail from './lessonDetail/index' // 课程详情
  24. import cardDetail from './cardDetail/index' // 体验卡详情
  25. import gymCardDetail from './gymCardDetail/index' // 健身卡详情
  26. import couponsDetail from './couponsDetail/index' // 体验券详情
  27. import receive from './receive/index' // 领取页面
  28. import receiveResults from './receiveResults/index' // 领取结果页面
  29. import receiveChannel from './receiveChannel/index' // 渠道领取页面
  30. import rush from './rush/index' // 抢购
  31. import calendar from './calendar/calendar' // 台历活动页
  32. import activeList from './activeList/activeList' // 活动列表
  33. import customizationDetail from './customization/customizationDetail' // 定制详情
  34. import customizationList from './customization/customizationList' // 定制列表
  35. import checkModel from './calendar/checkModel' // 台历模板选择
  36. import making from './calendar/making' // 台历制作
  37. import preview from './calendar/preview' // 台历预览
  38. Vue.use(Router)
  39. const router = new Router({
  40. routes: [{
  41. path: '/mainPage',
  42. name: 'mainPage',
  43. component: mainPage,
  44. children: [{ // 首页
  45. path: 'indexPage',
  46. name: 'indexPage',
  47. component: indexPage,
  48. children: []
  49. }, { // 城咖啡
  50. path: 'coffeeIndex',
  51. name: 'coffeeIndex',
  52. component: coffeeIndex,
  53. children: []
  54. }, { // 图书馆首页
  55. path: 'libraryIndex',
  56. name: 'libraryIndex',
  57. component: libraryIndex,
  58. children: []
  59. }, { // 个人中心
  60. path: 'userCenter',
  61. name: 'userCenter',
  62. component: userCenter,
  63. children: []
  64. }]
  65. }, { // 城咖啡-点单
  66. path: '/placeOrder',
  67. name: 'placeOrder',
  68. component: placeOrder,
  69. children: []
  70. }, { // 城咖啡-点单详情
  71. path: '/placeOrderDetail',
  72. name: 'placeOrderDetail',
  73. component: placeOrderDetail,
  74. children: []
  75. }, { // 城咖啡-点单列表
  76. path: '/orderList',
  77. name: 'orderList',
  78. component: orderList,
  79. children: []
  80. }, { // 项目专题
  81. path: '/majorProjects',
  82. name: 'majorProjects',
  83. component: majorProjects,
  84. children: []
  85. }, { // 课程列表
  86. path: '/courseList',
  87. name: 'courseList',
  88. component: courseList,
  89. children: []
  90. }, { // 项目专题列表
  91. path: '/majorProjectsList',
  92. name: 'majorProjectsList',
  93. component: majorProjectsList,
  94. children: []
  95. }, { // 项目专题详情
  96. path: '/majorProjectsDetail',
  97. name: 'majorProjectsDetail',
  98. component: majorProjectsDetail,
  99. children: []
  100. }, { // 购买课程下单
  101. path: '/placeOrderForCourse',
  102. name: 'placeOrderForCourse',
  103. component: placeOrderForCourse,
  104. children: []
  105. }, { // 5A
  106. path: '/fiveA',
  107. name: 'fiveA',
  108. component: fiveA,
  109. children: []
  110. }, { // 绑定手机号
  111. path: '/bindMobile',
  112. name: 'bindMobile',
  113. component: bindMobile,
  114. children: []
  115. }, { // 我的订单
  116. path: '/lessonOrder',
  117. name: 'lessonOrder',
  118. component: lessonOrder,
  119. children: []
  120. }, { // vip卡说明
  121. path: '/vip',
  122. name: 'vip',
  123. component: vip,
  124. children: []
  125. }, { // vip卡详情
  126. path: '/vipDetail',
  127. name: 'vipDetail',
  128. component: vipDetail,
  129. children: []
  130. }, { // 卡
  131. path: '/card',
  132. name: 'card',
  133. component: card,
  134. children: []
  135. }, { // 优惠券
  136. path: '/coupons',
  137. name: 'coupons',
  138. component: coupons,
  139. children: []
  140. }, { // 课程详情
  141. path: '/lessonDetail',
  142. name: 'lessonDetail',
  143. component: lessonDetail,
  144. children: []
  145. }, { // 体验卡详情
  146. path: '/cardDetail',
  147. name: 'cardDetail',
  148. component: cardDetail,
  149. children: []
  150. }, { // 健身卡详情
  151. path: '/gymCardDetail',
  152. name: 'gymCardDetail',
  153. component: gymCardDetail,
  154. children: []
  155. }, { // 体验券详情
  156. path: '/couponsDetail',
  157. name: 'couponsDetail',
  158. component: couponsDetail,
  159. children: []
  160. }, { // 卡券领取
  161. path: '/receive',
  162. name: 'receive',
  163. component: receive,
  164. children: []
  165. }, { // 卡券领取结果
  166. path: '/receiveResults',
  167. name: 'receiveResults',
  168. component: receiveResults,
  169. children: []
  170. }, { // 卡券领取(带参数,分享后的路径)
  171. path: '/receiveShared/:id/:salesid/:type/:random/:sharetype',
  172. name: 'receive',
  173. component: receive
  174. }, { // 渠道卡券领取
  175. path: '/receiveChannel',
  176. name: 'receiveChannel',
  177. component: receiveChannel,
  178. children: []
  179. }, { // 渠道卡券领取(带参数,分享后的路径)
  180. path: '/receiveChannelShared/:id/:type/:sharetype',
  181. name: 'receiveChannel',
  182. component: receiveChannel
  183. }, { // 抢购
  184. path: '/rush',
  185. name: 'rush',
  186. component: rush
  187. }, { // 台历活动页
  188. path: '/calendar',
  189. name: 'calendar',
  190. component: calendar
  191. }, { // 活动列表
  192. path: '/activeList',
  193. name: 'activeList',
  194. component: activeList
  195. }, { // 定制详情
  196. path: '/customizationDetail',
  197. name: 'customizationDetail',
  198. component: customizationDetail
  199. }, { // 定制列表
  200. path: '/customizationList',
  201. name: 'customizationList',
  202. component: customizationList
  203. }, { // 台历模板选择
  204. path: '/checkModel',
  205. name: 'checkModel',
  206. component: checkModel
  207. }, { // 台历制作
  208. path: '/making',
  209. name: 'making',
  210. component: making
  211. }, { // 台历预览
  212. path: '/preview',
  213. name: 'preview',
  214. component: preview
  215. }],
  216. linkActiveClass: 'active',
  217. })
  218. router.beforeEach((to, from, next) => {
  219. // console.log(to)
  220. // if(){
  221. // }
  222. next()
  223. })
  224. export default router