From a986a8d6fb5e44f7044469f5f420ce0d7b5bf235 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 26 十一月 2025 11:36:02 +0800
Subject: [PATCH] 11
---
src/App.vue | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 54b374a..57f6d29 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,6 +6,7 @@
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' })
@@ -40,7 +41,12 @@
})
const handleUnload = async () => {
- await userStore.loginOut()
+ //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()
}
--
Gitblit v1.9.3