123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- import Vue from 'vue'
- import Router from 'vue-router'
-
- import mainPage from './mainPage/index' // 主页
- import indexPage from './mainPage/indexPage/index' // 首页
- import fiveA from './fiveA/index' // 5A
- import majorProjects from './majorProjects/index' // 项目专题
- import majorProjectsDetail from './majorProjectsDetail/index' // 项目专题详情
- import placeOrderForCourse from './placeOrderForCourse/index' // 购买课程下单
- import coffeeIndex from './mainPage/coffeeIndex/index' // 城咖啡
- import placeOrder from './placeOrder/index' // 城咖啡-点单
- import placeOrderDetail from './placeOrderDetail/index' // 城咖啡-点单详情
- import orderList from './orderList/index' // 城咖啡-点单列表
- import userCenter from './mainPage/userCenter/index' // 个人中心
- import bindMobile from './bindMobile/bindMobile' // 绑定手机号
- import lessonOrder from './lessonOrder/index' // 我的订单
- import vip from './vip/index' // vip卡说明
- import card from './card/index' // 卡
- import coupons from './coupons/index' // 优惠券
- import lessonDetail from './lessonDetail/index' // 课程详情
- import cardDetail from './cardDetail/index' // 体验卡详情
- import gymCardDetail from './gymCardDetail/index' // 健身卡详情
- import couponsDetail from './couponsDetail/index' // 体验券详情
- import receive from './receive/index' // 领取页面
- import receiveResults from './receiveResults/index' // 领取结果页面
- import receiveChannel from './receiveChannel/index' // 渠道领取页面
-
- Vue.use(Router)
-
- const router = new Router({
- routes: [{
- path: '/mainPage',
- name: 'mainPage',
- component: mainPage,
- children: [{ // 首页
- path: 'indexPage',
- name: 'indexPage',
- component: indexPage,
- children: []
- }, { // 城咖啡
- path: 'coffeeIndex',
- name: 'coffeeIndex',
- component: coffeeIndex,
- children: []
- }, { // 个人中心
- path: 'userCenter',
- name: 'userCenter',
- component: userCenter,
- children: []
- }]
- }, { // 城咖啡-点单
- path: '/placeOrder',
- name: 'placeOrder',
- component: placeOrder,
- children: []
- }, { // 城咖啡-点单详情
- path: '/placeOrderDetail',
- name: 'placeOrderDetail',
- component: placeOrderDetail,
- children: []
- }, { // 城咖啡-点单列表
- path: '/orderList',
- name: 'orderList',
- component: orderList,
- children: []
- }, { // 项目专题
- path: '/majorProjects',
- name: 'majorProjects',
- component: majorProjects,
- children: []
- }, { // 项目专题详情
- path: '/majorProjectsDetail',
- name: 'majorProjectsDetail',
- component: majorProjectsDetail,
- children: []
- }, { // 购买课程下单
- path: '/placeOrderForCourse',
- name: 'placeOrderForCourse',
- component: placeOrderForCourse,
- children: []
- }, { // 5A
- path: '/fiveA',
- name: 'fiveA',
- component: fiveA,
- children: []
- }, { // 绑定手机号
- path: '/bindMobile',
- name: 'bindMobile',
- component: bindMobile,
- children: []
- }, { // 我的订单
- path: '/lessonOrder',
- name: 'lessonOrder',
- component: lessonOrder,
- children: []
- }, { // vip卡说明
- path: '/vip',
- name: 'vip',
- component: vip,
- children: []
- }, { // 卡
- path: '/card',
- name: 'card',
- component: card,
- children: []
- }, { // 优惠券
- path: '/coupons',
- name: 'coupons',
- component: coupons,
- children: []
- }, { // 课程详情
- path: '/lessonDetail',
- name: 'lessonDetail',
- component: lessonDetail,
- children: []
- }, { // 体验卡详情
- path: '/cardDetail',
- name: 'cardDetail',
- component: cardDetail,
- children: []
- }, { // 健身卡详情
- path: '/gymCardDetail',
- name: 'gymCardDetail',
- component: gymCardDetail,
- children: []
- }, { // 体验券详情
- path: '/couponsDetail',
- name: 'couponsDetail',
- component: couponsDetail,
- children: []
- }, { // 卡券领取
- path: '/receive',
- name: 'receive',
- component: receive,
- children: []
- }, { // 卡券领取结果
- path: '/receiveResults',
- name: 'receiveResults',
- component: receiveResults,
- children: []
- }, { // 卡券领取(带参数,分享后的路径)
- path: '/receiveShared/:id/:salesid/:type/:random/:sharetype',
- name: 'receive',
- component: receive
- }, { // 渠道卡券领取
- path: '/receiveChannel',
- name: 'receiveChannel',
- component: receiveChannel,
- children: []
- }, { // 渠道卡券领取(带参数,分享后的路径)
- path: '/receiveChannelShared/:id/:type/:sharetype',
- name: 'receiveChannel',
- component: receiveChannel
- }],
- linkActiveClass: 'active',
- })
-
- router.beforeEach((to, from, next) => {
- // console.log(to)
- // if(){
-
- // }
- next()
- })
-
- export default router
|