From a261a978f2119e02391c2ed286ce4f0f20e24c4c Mon Sep 17 00:00:00 2001 From: yelan Date: Mon, 31 Aug 2026 10:58:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(auth):=20=E5=B0=86=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=BF=81=E7=A7=BB=E8=87=B3=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E7=99=BB=E5=BD=95=20store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clinical-web/src/api/auth.ts | 2 - clinical-web/src/components/layout/Menu.vue | 14 ++-- clinical-web/src/router/index.ts | 8 +- clinical-web/src/stores/app.ts | 64 +++------------ clinical-web/src/stores/login.ts | 87 +++++++++++++++++++++ clinical-web/src/views/auth/LoginView.vue | 9 +-- 6 files changed, 111 insertions(+), 73 deletions(-) create mode 100644 clinical-web/src/stores/login.ts diff --git a/clinical-web/src/api/auth.ts b/clinical-web/src/api/auth.ts index 4188064..836af75 100644 --- a/clinical-web/src/api/auth.ts +++ b/clinical-web/src/api/auth.ts @@ -1,7 +1,6 @@ import axios from 'axios' import { request } from '@/utils/request' -import { saveAuthSession } from '@/utils/auth-storage' import type { AuthenticatedUser, CurrentUserResponse, @@ -78,7 +77,6 @@ export async function login(payload: LoginRequest): Promise { user: normalizeAuthenticatedUser(session.user), } - saveAuthSession(normalizedSession) return normalizedSession } diff --git a/clinical-web/src/components/layout/Menu.vue b/clinical-web/src/components/layout/Menu.vue index d4528a3..cdc46cd 100644 --- a/clinical-web/src/components/layout/Menu.vue +++ b/clinical-web/src/components/layout/Menu.vue @@ -1,8 +1,7 @@