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 | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/SceneIntroDialog.tsx b/src/components/SceneIntroDialog.tsx index 716076c..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 ( @@ -263,7 +264,7 @@ isOpen={showDataPreview} onClose={() => setShowDataPreview(false)} markdownContent={scene.exampleData} - sceneType={scene.chatbotId === 'DfH4cIzujVGvn5iR' || scene.chatbotId === 'zO9YQDEHdIApG9zC' ? 'chadan' : + sceneType={scene.chatbotId === 'RhMYLHI1SZNiX4kl' || scene.chatbotId === 'zO9YQDEHdIApG9zC' ? 'chadan' : scene.chatbotId === 'JELkWpPLHQfRNhEH' ? 'buliao' : undefined} /> )} -- Gitblit v1.9.3