You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.2 KiB
JavaScript
61 lines
1.2 KiB
JavaScript
|
6 years ago
|
import Vue from 'vue'
|
||
|
|
import Router from 'vue-router'
|
||
|
|
import Login from '@/pages/Login'
|
||
|
|
import ExternalContact from '@/pages/ExternalContact'
|
||
|
|
import Home from '@/pages/Home'
|
||
|
|
import AccountManager from '@/pages/user/AccountManager'
|
||
|
|
import RoleManager from '@/pages/user/RoleManager'
|
||
|
|
import ShopIncrease from '@/pages/shop/ShopIncrease'
|
||
|
|
|
||
|
|
Vue.use(Router);
|
||
|
|
const router = new Router({
|
||
|
|
mode: 'history',
|
||
|
|
base: '/kiisoo-ic',
|
||
|
|
routes: [
|
||
|
|
{
|
||
|
|
path: '/',
|
||
|
|
redirect: '/login'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/login',
|
||
|
|
name: 'login',
|
||
|
|
component: Login
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/externalContact',
|
||
|
|
name: 'externalContact',
|
||
|
|
component: ExternalContact
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/home',
|
||
|
|
name: 'Home',
|
||
|
|
component: Home,
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
path: '/AccountManager',
|
||
|
|
name: 'AccountManager',
|
||
|
|
component: AccountManager
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/RoleManager',
|
||
|
|
name: 'RoleManager',
|
||
|
|
component: RoleManager
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/ShopIncrease',
|
||
|
|
name: 'ShopIncrease',
|
||
|
|
component: ShopIncrease
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
});
|
||
|
|
/*
|
||
|
|
* 跳转前的处理事件
|
||
|
|
* */
|
||
|
|
router.beforeEach(function (to, from, next) {
|
||
|
|
next();
|
||
|
|
});
|
||
|
|
|
||
|
|
export default router
|