123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- const Index = () => import('@/pages/index');
- const Login = () => import('@/pages/login');
- const Log = () => import('@/pages/subPages/log');
- const Express = () => import('@/pages/subPages/express');
- const Order = () => import('@/pages/subPages/order');
- const Message = () => import('@/pages/subPages/message');
- const Status = () => import('@/pages/subPages/status');
- const View = () => import('@/pages/subPages/view');
- Vue.use(VueRouter)
- const routes = [
- {
- path: '/',
- name: 'Index',
- component: Index,
- redirect:'/express',
- children:[
- {
- path:'/log',
- name:'log',
- component:Log
- },
- {
- path:'/express',
- name:'express',
- component:Express
- },
- {
- path:'/order',
- name:'order',
- component:Order
- },
- {
- path:'/message',
- name:'message',
- component:Message
- },
- {
- path:'/status',
- name:'status',
- component:Status
- },
- {
- path:'/view',
- name:'view',
- component:View
- }
- ]
- },
- {
- path: '/login',
- name: 'Login',
- component: Login
- }
- ]
- const router = new VueRouter({
- routes
- })
- router.beforeEach((to,from,next)=>{
- next();
- });
- export default router
|