From e89834c34e8f987cd59a167aa8c8369a731ef44c Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 11 四月 2025 12:19:27 +0800
Subject: [PATCH] 根据检查类型 , 自动确费

---
 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