From 57f311036b7e97453413b47ebe5d1248dfff50cc Mon Sep 17 00:00:00 2001 From: hongjli <3117313295@qq.com> Date: 星期三, 23 四月 2025 15:14:02 +0800 Subject: [PATCH] 新建聊天页面 --- src/components/SceneIntroDialog.tsx | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/SceneIntroDialog.tsx b/src/components/SceneIntroDialog.tsx index a79138c..fea9b41 100644 --- a/src/components/SceneIntroDialog.tsx +++ b/src/components/SceneIntroDialog.tsx @@ -4,7 +4,6 @@ import { Fragment, useEffect, useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import DataPreviewDialog from './DataPreviewDialog'; -import { useRouter } from 'next/navigation'; interface SceneIntroDialogProps { isOpen: boolean; @@ -27,7 +26,6 @@ scene }: SceneIntroDialogProps) { const [showDataPreview, setShowDataPreview] = useState(false); - const router = useRouter(); // 纭繚鍔ㄧ敾鐘舵�佸湪姣忔鎵撳紑鏃堕兘琚噸缃� useEffect(() => { @@ -46,7 +44,10 @@ const handleStartChat = () => { onClose(); - router.push(`/ai-scene/chat?scene=${scene.chatbotId}`); + document.body.classList.add('page-transitioning'); + setTimeout(() => { + window.location.href = `/ai-scene/chat?scene=${scene.chatbotId}`; + }, 100); }; return ( -- Gitblit v1.9.3