Update index.js

This commit is contained in:
Haven 2017-11-23 11:17:00 +08:00 committed by GitHub
parent d7cf96927e
commit a5317d3c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ router.beforeEach((to, from, next) => {
Util.title(to.meta.title);
if (Cookies.get('locking') === '1' && to.name !== 'locking') { // 判断当前是否是锁定状态
next({
replace: true
replace: true,
name: 'locking'
});
} else if (Cookies.get('locking') === '0' && to.name === 'locking') {
@ -41,7 +41,7 @@ router.beforeEach((to, from, next) => {
Util.toDefaultPage([otherRouter, ...appRouter], to.name, router, next); // 如果在地址栏输入的是一级菜单则默认打开其第一个二级菜单的页面
} else {
next({
replace: true
replace: true,
name: 'error_403'
});
}