From c4c8103af276cf902822d3ea368883da680cdccb Mon Sep 17 00:00:00 2001 From: vince Date: Thu, 11 Jul 2024 21:48:56 +0800 Subject: [PATCH] perf: improve the login process --- apps/web-antd/src/apis/modules/mock.ts | 2 +- apps/web-antd/src/layouts/basic.vue | 7 +++++- apps/web-antd/src/store/modules/access.ts | 24 +++++++++++++++---- apps/web-antd/src/store/modules/app.ts | 2 +- .../views/_essential/authentication/login.vue | 22 +---------------- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/apps/web-antd/src/apis/modules/mock.ts b/apps/web-antd/src/apis/modules/mock.ts index 3f2f402c..03db1ccb 100644 --- a/apps/web-antd/src/apis/modules/mock.ts +++ b/apps/web-antd/src/apis/modules/mock.ts @@ -1,7 +1,7 @@ import { requestClient } from '#/forward'; /** - * 模拟人意状态码 + * 模拟任意状态码 */ async function getMockStatus(status: string) { return requestClient.get('/mock/status', { params: { status } }); diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 9b6811d9..3c2178e9 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -85,7 +85,11 @@ const menus = computed(() => [ const appStore = useAppStore(); const accessStore = useAccessStore(); -const { openLoginExpiredModal, userInfo } = toRefs(accessStore); +const { + loading: loginLoading, + openLoginExpiredModal, + userInfo, +} = toRefs(accessStore); const router = useRouter(); async function handleLogout() { @@ -126,6 +130,7 @@ function handleMakeAll() {