From a5317d3c8c4a6ecf24aa41323389ac1b0c79c836 Mon Sep 17 00:00:00 2001 From: Haven Date: Thu, 23 Nov 2017 11:17:00 +0800 Subject: [PATCH] Update index.js --- src/router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 1582ef141..be23d9570 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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' }); }