From 821014c0a2d9a1e83d0b8ee4ec7914447af19381 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Sun, 21 May 2023 16:05:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E8=8E=B7=E5=8F=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=A4=B4=E5=83=8F&=E6=98=B5=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +++ src/components/t-sidebar.vue | 33 +++++++++++++------ src/pages/Config.vue | 10 ++++++ src/store/modules/hk4e.ts | 47 --------------------------- src/store/modules/user.ts | 53 +++++++++++++++++++++++++++++++ src/types/UserRequest.d.ts | 17 ++++++++++ src/web/api/BBS.ts | 10 ++++++ src/web/api/TGApi.ts | 2 ++ src/web/request/TGRequest.ts | 2 ++ src/web/request/getUserInfo.ts | 47 +++++++++++++++++++++++++++ src/web/request/initCookie.ts | 12 ++----- src/web/utils/TGUtils.ts | 3 +- src/web/utils/getRequestHeader.ts | 45 +++++++++++++++++++++++--- src/web/utils/tools.ts | 15 --------- 14 files changed, 215 insertions(+), 85 deletions(-) delete mode 100644 src/store/modules/hk4e.ts create mode 100644 src/store/modules/user.ts create mode 100644 src/web/api/BBS.ts create mode 100644 src/web/request/getUserInfo.ts diff --git a/src/App.vue b/src/App.vue index 319681ba..c05d9af5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,8 +33,10 @@ import TBackTop from "./components/t-backTop.vue"; import { fs, window, app, event } from "@tauri-apps/api"; // store import { useAppStore } from "./store/modules/app"; +import { useUserStore } from "./store/modules/user"; const appStore = useAppStore(); +const userStore = useUserStore(); const isMain = ref(true as boolean); const theme = ref(appStore.theme as string); @@ -50,6 +52,8 @@ onMounted(async () => { await win.setTitle(title); await checkLoad(); } + // 保存 cookie + await userStore.initCookie(); }); // 监听主题变化 diff --git a/src/components/t-sidebar.vue b/src/components/t-sidebar.vue index 59214104..68642ecc 100644 --- a/src/components/t-sidebar.vue +++ b/src/components/t-sidebar.vue @@ -106,11 +106,16 @@
- + +