From 761491ec41ec06b8c3a8a9f172d86eebc3e1c089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Tue, 16 Jun 2026 19:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-web/src/App.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend-web/src/App.tsx b/frontend-web/src/App.tsx index 0c191a09..88ee59df 100644 --- a/frontend-web/src/App.tsx +++ b/frontend-web/src/App.tsx @@ -86,12 +86,22 @@ function AppProviders({ children }: { children: React.ReactNode }) { ); } +/** + * 根路由 `/` → `/login` 重定向,**保留 query string**。 + * 外部系统的任务深链落在 `#/?taskId=...&goPath=...`,裸 `` 会丢掉 + * query,导致 LoginPage 读不到参数;这里把 search 一并带过去。 + */ +function RootRedirect() { + const { search } = useLocation(); + return ; +} + export function App() { return ( - } /> + } /> } /> } /> } />