hongjli
2025-04-23 57f311036b7e97453413b47ebe5d1248dfff50cc
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,6 +264,8 @@
                                  isOpen={showDataPreview}
                                  onClose={() => setShowDataPreview(false)}
                                  markdownContent={scene.exampleData}
                                  sceneType={scene.chatbotId === 'RhMYLHI1SZNiX4kl' || scene.chatbotId === 'zO9YQDEHdIApG9zC' ? 'chadan' :
                                           scene.chatbotId === 'JELkWpPLHQfRNhEH' ? 'buliao' : undefined}
                                />
                              )}
                            </div>