From f98ab75bf0f7fb54e7e3955a5f6e5a4935a86cbe Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 31 十月 2024 11:21:14 +0800
Subject: [PATCH] fix warning

---
 src/permission.ts |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/permission.ts b/src/permission.ts
index 7f20ed4..b0f6231 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -6,6 +6,7 @@
 import { useNProgress } from '@/hooks/web/useNProgress'
 import { usePageLoading } from '@/hooks/web/usePageLoading'
 import { useDictStoreWithOut } from '@/store/modules/dict'
+import { useCheckTypeStoreWithOut } from '@/store/modules/checkType'
 import { useUserStoreWithOut } from '@/store/modules/user'
 import { usePermissionStoreWithOut } from '@/store/modules/permission'
 
@@ -53,7 +54,9 @@
   '/auth-redirect',
   '/bind',
   '/register',
-  '/oauthLogin/gitee'
+  '/oauthLogin/gitee',
+  '/calling-screen-big',
+  '/calling-screen-room'
 ]
 
 // 璺敱鍔犺浇鍓�
@@ -61,14 +64,15 @@
   console.info("router.beforeEach to: " + to.fullPath + " from: " + from.fullPath)
   start()
   loadStart()
+
+  if (whiteList.indexOf(to.path) !== -1) {
+    next()
+    return
+  }
+
   if (!getAccessToken()) {
-      if (whiteList.indexOf(to.path) !== -1) {
-          next()
-          return
-      } else {
-          next(`/login?redirect=${to.fullPath}`) // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
-          return
-      }
+    next(`/login?redirect=${to.fullPath}`) // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
+    return
   }
 
   if (to.path === '/login') {
@@ -79,10 +83,14 @@
   // 鑾峰彇鎵�鏈夊瓧鍏�
   const dictStore = useDictStoreWithOut()
   const userStore = useUserStoreWithOut()
+  const checkTypeStore = useCheckTypeStoreWithOut()
   const permissionStore = usePermissionStoreWithOut()
   if (!dictStore.getIsSetDict) {
     await dictStore.setDictMap()
   }
+  if (!checkTypeStore.getIsSetCheckType) {
+    await checkTypeStore.setCheckTypeMap()
+  }
 
   if (userStore.getIsSetUser ) {
 

--
Gitblit v1.9.3