From 9f99a0281836fec6c32e77394e4bddf8cefd722d Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 21 May 2025 02:18:08 +0800 Subject: [PATCH] . --- chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx b/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx index 7149c4f..010f807 100644 --- a/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx +++ b/chatdesk-ui/app/[locale]/[workspaceid]/layout.tsx @@ -85,7 +85,9 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) { setRedirected(true) // 设置标志,避免跳转重复 return router.push(`/${locale}/login`) } else { - await fetchWorkspaceData(workspaceId) + if (!redirected){ + await fetchWorkspaceData(workspaceId) // 如果有session,则加载工作区数据 + } } })() }, [workspaceId, redirected])