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 ( - } /> + } /> } /> } /> } />