123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- const Index = () => import('@/pages/index');
- const Login = () => import('@/pages/login');
- const order = () => import('@/pages/subPages/order');
- // 柜体控制
- // const Express = () => import('@/pages/subPages/express');
- const balance = () => import('@/pages/subPages/balance');
- 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:'/order',
- name:'order',
- component:order
- },
- // 余额充值
- {
- path:'/balance',
- name:'balance',
- component:balance
- },
- // 实时动账
- {
- path:'/message',
- name:'message',
- component:Message
- },
- // {
- // path:'/status',
- // name:'status',
- // component:Status
- // },
- // 安全IP控制
- {
- 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
|