diff --git a/components/pages/work-flow/use-edit-data.tsx b/components/pages/work-flow/use-edit-data.tsx index 32181c5..5b28a82 100644 --- a/components/pages/work-flow/use-edit-data.tsx +++ b/components/pages/work-flow/use-edit-data.tsx @@ -75,20 +75,19 @@ export const useEditData = (tabType: string) => { const searchParams = useSearchParams(); const projectId = searchParams.get('episodeId') || ''; const [loading, setLoading] = useState(true); - const [shotData, setShotData] = useState(mockShotData); + const [shotData, setShotData] = useState([]); const { videoSegments, getVideoSegmentList, setSelectedSegment, - regenerateVideoSegment + regenerateVideoSegment, + filterRole } = useShotService(); useEffect(() => { if (tabType === 'shot') { getVideoSegmentList(projectId).then(() => { - console.log('useEditData-----videoSegments', videoSegments); - // setShotData(videoSegments); setLoading(false); }).catch((err) => { console.log('useEditData-----err', err); @@ -96,13 +95,18 @@ export const useEditData = (tabType: string) => { setLoading(false); }); } - }, [tabType]); + useEffect(() => { + console.log('useEditData-----videoSegments', videoSegments); + setShotData(videoSegments); + }, [videoSegments]); + return { loading, shotData, setSelectedSegment, - regenerateVideoSegment + regenerateVideoSegment, + filterRole } } \ No newline at end of file diff --git a/components/ui/edit-modal.tsx b/components/ui/edit-modal.tsx index af5fe86..7bfed3a 100644 --- a/components/ui/edit-modal.tsx +++ b/components/ui/edit-modal.tsx @@ -33,7 +33,7 @@ const tabs = [ { id: '0', label: 'Script', icon: FileText }, { id: '1', label: 'Character', icon: Users }, { id: '2', label: 'Scene', icon: Image }, - { id: '3', label: 'Shot', icon: Video }, + { id: '3', label: 'Video', icon: Video }, { id: '4', label: 'Music', icon: Music }, // { id: '5', label: '剪辑', icon: Scissors }, { id: 'settings', label: 'Settings', icon: Settings }, @@ -124,10 +124,7 @@ export function EditModal({ case '3': return ( ); diff --git a/components/ui/person-detection.tsx b/components/ui/person-detection.tsx index 8274d09..271287f 100644 --- a/components/ui/person-detection.tsx +++ b/components/ui/person-detection.tsx @@ -187,6 +187,7 @@ export const PersonDetectionScene: React.FC = ({ {videoSrc && (