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])