From 0dd026279badf0f9e3fa7d9d36c66f3d8d2dd60b Mon Sep 17 00:00:00 2001 From: 2991692032 Date: Sun, 1 Jun 2025 14:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unilife-frontend/src/router/index.ts | 2 +- unilife-frontend/src/types/index.ts | 2 +- unilife-frontend/src/views/HomeView.vue | 86 ------------------- .../src/views/ai/AIAssistantView.vue | 8 +- unilife-frontend/src/views/auth/LoginView.vue | 21 +++-- .../src/views/auth/RegisterView.vue | 24 ++++-- .../java/com/unilife/model/dto/LoginDTO.java | 2 +- .../unilife/service/impl/AiServiceImpl.java | 2 +- .../unilife/service/impl/UserServiceImpl.java | 25 ++++-- .../main/java/com/unilife/utils/JwtUtil.java | 36 ++++++-- .../src/main/resources/application.yml | 2 +- 11 files changed, 86 insertions(+), 124 deletions(-) diff --git a/unilife-frontend/src/router/index.ts b/unilife-frontend/src/router/index.ts index 0a9eb05..b75f90a 100644 --- a/unilife-frontend/src/router/index.ts +++ b/unilife-frontend/src/router/index.ts @@ -84,7 +84,7 @@ router.beforeEach((to) => { return '/login' } - if ((to.name === 'login' || to.name === 'register') && userStore.isLoggedIn) { + if (to.name === 'login' && userStore.isLoggedIn) { return '/forum' } }) diff --git a/unilife-frontend/src/types/index.ts b/unilife-frontend/src/types/index.ts index f8e526a..8b03941 100644 --- a/unilife-frontend/src/types/index.ts +++ b/unilife-frontend/src/types/index.ts @@ -31,7 +31,7 @@ export interface User { } export interface LoginRequest { - email: string + account: string // 支持用户名或邮箱 password: string } diff --git a/unilife-frontend/src/views/HomeView.vue b/unilife-frontend/src/views/HomeView.vue index fd4c478..272e07c 100644 --- a/unilife-frontend/src/views/HomeView.vue +++ b/unilife-frontend/src/views/HomeView.vue @@ -52,24 +52,6 @@ 了解更多 - - -
-
-
1000+
-
活跃用户
-
-
-
-
500+
-
讨论话题
-
-
-
-
200+
-
学习资源
-
-
@@ -168,28 +150,6 @@ - -