From 905c08fb2c190435e2a6771cae8e4bf29edf3a79 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Tue, 19 Mar 2024 16:38:37 +0800
Subject: [PATCH] 升级oshi到最新版本6.5.0
---
ruoyi-ui/src/permission.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js
index 6bb0a1f..c568979 100644
--- a/ruoyi-ui/src/permission.js
+++ b/ruoyi-ui/src/permission.js
@@ -8,7 +8,7 @@
NProgress.configure({ showSpinner: false })
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
+const whiteList = ['/login', '/register']
router.beforeEach((to, from, next) => {
NProgress.start()
@@ -18,6 +18,8 @@
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
+ } else if (whiteList.indexOf(to.path) !== -1) {
+ next()
} else {
if (store.getters.roles.length === 0) {
isRelogin.show = true
@@ -45,7 +47,7 @@
// 在免登录白名单,直接进入
next()
} else {
- next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
+ next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
NProgress.done()
}
}
--
Gitblit v1.9.2