From 1272e8fe7d8b9b3955d20c071eb5c0d55a5f8bb6 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期三, 20 十二月 2023 14:44:50 +0800
Subject: [PATCH] fix 修复 append-to-body 编写错误

---
 src/permission.ts |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/permission.ts b/src/permission.ts
index c2743eb..c819ff4 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -10,7 +10,7 @@
 import usePermissionStore from '@/store/modules/permission';
 
 NProgress.configure({ showSpinner: false });
-const whiteList = ['/login', '/register', '/social-login'];
+const whiteList = ['/login', '/register', '/social-callback'];
 
 router.beforeEach(async (to, from, next) => {
   NProgress.start();
@@ -20,6 +20,8 @@
     if (to.path === '/login') {
       next({ path: '/' });
       NProgress.done();
+    } else if (whiteList.indexOf(to.path) !== -1) {
+      next()
     } else {
       if (useUserStore().roles.length === 0) {
         isRelogin.show = true;

--
Gitblit v1.9.3