From dc01c375e6ddac8157ab318baacb90d078fe3e8c Mon Sep 17 00:00:00 2001 From: Trae AI Date: Thu, 22 Jan 2026 14:55:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=B5=8F=E8=A7=88=E5=99=A8=E7=BC=93=E5=AD=98=E8=80=8C?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=E4=BC=A0=E9=80=92=E5=8F=82=E6=95=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/main/resources/static/index.html | 15 ++ web/src/main/resources/static/login.html | 208 +++++++++++++++++++++-- 2 files changed, 209 insertions(+), 14 deletions(-) diff --git a/web/src/main/resources/static/index.html b/web/src/main/resources/static/index.html index bb05b8f..3686fe5 100644 --- a/web/src/main/resources/static/index.html +++ b/web/src/main/resources/static/index.html @@ -762,6 +762,21 @@ var currentTypeFilter = null; function init() { + // 检查URL是否包含登录参数 + const urlParams = new URLSearchParams(window.location.search); + const projectNameFromUrl = urlParams.get('projectName'); + const userNameFromUrl = urlParams.get('userName'); + const passwordFromUrl = urlParams.get('password'); + + // 如果URL包含登录参数,清除旧的userInfo并跳转到login.html处理新的登录 + if (userNameFromUrl && passwordFromUrl) { + console.log('URL包含登录参数,清除旧的用户信息并跳转到登录页面'); + localStorage.removeItem('userInfo'); + // 保留URL参数,让login.html处理 + window.location.href = 'login.html' + window.location.search; + return; + } + var savedUserInfo = localStorage.getItem('userInfo'); if (!savedUserInfo) { window.location.href = 'login.html'; diff --git a/web/src/main/resources/static/login.html b/web/src/main/resources/static/login.html index b5e44f9..af87f38 100644 --- a/web/src/main/resources/static/login.html +++ b/web/src/main/resources/static/login.html @@ -86,18 +86,18 @@

用户登录

-
+
- +
- +
- +
@@ -105,18 +105,114 @@
\ No newline at end of file