/* * @Date: 2023-02-25 16:34:35 * @LastEditors: JinxChen * @LastEditTime: 2023-03-14 09:33:17 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js * @description: */ /* * @Date: 2022-01-19 10:08:26 * @LastEditors: JinxChen * @LastEditTime: 2023-02-25 16:33:59 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js * @description: */ import Vue from "vue"; import VueRouter from "vue-router"; import Nprogress from "nprogress"; import "nprogress/nprogress.css"; Vue.use(VueRouter); const routes = [ { path: '/', redirect: 'index' }, { path: '/index', name: 'index', component: resolve => require(['@/views/index'], resolve) }, { path: '/packageHome', name: 'packageHome', component: resolve => require(['@/views/package-home'], resolve) }, { path: '/packageList', name: 'packageList', component: resolve => require(['@/views/package-list'], resolve) }, { path: '/payResult', name: 'payResult', component: resolve => require(['@/views/pay-result'], resolve) }, { path: '/cardInfo', name: 'cardInfo', component: resolve => require(['@/views/card-info'], resolve) }, { path: '/packageBuy', name: 'packageBuy', component: resolve => require(['@/views/package-buy'], resolve) }, { path: '/buyRecord', name: 'buyRecord', component: resolve => require(['@/views/buy-record'], resolve) }, { path: '/activeStatus', name: 'activeStatus', component: resolve => require(['@/views/active-status'], resolve) }, { path: '/cardActive', name: 'cardActive', component: resolve => require(['@/views/card-active'], resolve) }, ]; const router = new VueRouter({ //mode: "history", base: process.env.BASE_URL, routes, }); router.beforeEach((to, form, next) => { /* Nprogress.start(); */ next(); }); router.afterEach(() => { /* Nprogress.done(); */ }); export default router;