From c314661d7353b58f926aa5a99abfc40313638521 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 27 九月 2026 16:28:36 +0800
Subject: [PATCH] 瘦身了框架

---
 src/App.vue |   30 ++++--------------------------
 1 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 57f6d29..6b02c7e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,15 +4,8 @@
 import { useDesign } from '@/hooks/web/useDesign'
 import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 import routerSearch from '@/components/RouterSearch/index.vue'
-import {useUserStore} from "@/store/modules/user";
-import {useTagsViewStore} from "@/store/modules/tagsView";
-import {getAccessToken} from "@/utils/auth";
 
 defineOptions({ name: 'APP' })
-
-const userStore = useUserStore()
-
-const tagsViewStore = useTagsViewStore()
 
 const { getPrefixCls } = useDesign()
 const prefixCls = getPrefixCls('app')
@@ -31,25 +24,10 @@
 }
 setDefaultTheme()
 
-/** 鍒濆鍖� **/
-onMounted(() => {
-  window.addEventListener('unload', handleUnload);
-})
-
-onBeforeUnmount(() => {
-  window.removeEventListener('unload', handleUnload);
-})
-
-const handleUnload = async () => {
-  //await userStore.loginOut()
-  if (getAccessToken()) {
-    const loginouturl = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/auth/logout' + '?token=' + getAccessToken()
-    navigator.sendBeacon(loginouturl, JSON.stringify(""))
-  }
-
-  tagsViewStore.delAllViews()
-}
-
+// 娉ㄦ剰锛氳繖閲屼笉瑕佸湪 unload 鏃惰皟鐢ㄧ櫥鍑猴紙涔熶笉瑕佺敤 sendBeacon 鎵� /system/auth/logout锛夈��
+// 鍚庣 logout 浼氭妸 refresh token 涓�骞跺垹闄わ紝瀵艰嚧椤甸潰鍒锋柊/鍏抽棴鍚庨噸鏂版墦寮�鏃舵棤娉曠画鏈燂紝
+// 鍙兘寮广�岀櫥褰曡秴鏃讹紝璇烽噸鏂扮櫥褰曘�嶅苟鏁撮〉璺宠浆锛岀敤鎴峰師鏉ユ墦寮�鐨勯〉闈㈠叏閮ㄤ涪澶便��
+// 闇�瑕佺寮�搴т綅璇风敤椤甸潰鍐呯殑銆岀搴с�嶏紝闇�瑕佺粨鏉熶細璇濊鐢ㄥ彸涓婅銆岄��鍑虹郴缁熴�嶃��
 </script>
 <template>
   <ConfigGlobal :size="currentSize">

--
Gitblit v1.9.3