From 1de8004b438815a21aa606d6a91bfd3d9e5a737e Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期一, 31 五月 2021 10:17:15 +0800
Subject: [PATCH] 去除虚拟登录验证。
---
src/router/index.js | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index 6bc1550..bcc7434 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -21,21 +21,26 @@
const token = getToken()
if (!token && to.name !== LOGIN_PAGE_ROUTE_NAME) {
// 鏈櫥褰曚笖瑕佽烦杞殑椤甸潰涓嶆槸鐧诲綍椤�
- next({
+ /* next({
name: LOGIN_PAGE_ROUTE_NAME // 璺宠浆鍒扮櫥褰曢〉
- })
+ }) */
+ next() // 璺宠浆
} else if (!token && to.name === LOGIN_PAGE_ROUTE_NAME) {
// 鏈櫥闄嗕笖瑕佽烦杞殑椤甸潰鏄櫥褰曢〉
next() // 璺宠浆
} else if (token && to.name === LOGIN_PAGE_ROUTE_NAME) {
// 宸茬櫥褰曚笖瑕佽烦杞殑椤甸潰鏄櫥褰曢〉
- next({
- name: homeRouterName // 璺宠浆鍒癶omeName椤�
- })
+ // next({
+ // name: homeRouterName // 璺宠浆鍒癶omeName椤�
+ // })
+ console.log(homeRouterName)
+ next()
} else if (!token) {
- next({
- name: LOGIN_PAGE_ROUTE_NAME // 璺宠浆鍒扮櫥褰曢〉
- })
+ // next({
+ // name: LOGIN_PAGE_ROUTE_NAME // 璺宠浆鍒扮櫥褰曢〉
+ // })
+ console.log(LOGIN_PAGE_ROUTE_NAME)
+ next()
} else {
next()
}
--
Gitblit v1.8.0