From b7fe03d5ee5224e7ca1ae00d51e7ec2a5303b767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Mon, 18 Aug 2025 22:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20=E6=9C=AA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E9=95=9C=E5=A4=B4=E6=8F=8F=E8=BF=B0=E4=B9=9F?= =?UTF-8?q?=E8=83=BD=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/Interaction/ShotService.ts | 2 ++ components/ui/shot-tab-content.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/service/Interaction/ShotService.ts b/app/service/Interaction/ShotService.ts index 08010e4..cb2dd10 100644 --- a/app/service/Interaction/ShotService.ts +++ b/app/service/Interaction/ShotService.ts @@ -180,6 +180,8 @@ export const useShotService = (): UseShotService => { try { setLoading(true); + console.log('shotInfo-selectedSegment', selectedSegment); + // 调用API重新生成视频片段,返回任务状态信息 const taskResult = await vidoEditUseCase.regenerateVideoSegment( projectId, diff --git a/components/ui/shot-tab-content.tsx b/components/ui/shot-tab-content.tsx index 9e748bf..50eb4c4 100644 --- a/components/ui/shot-tab-content.tsx +++ b/components/ui/shot-tab-content.tsx @@ -56,10 +56,12 @@ export const ShotTabContent = (props: ShotTabContentProps) => { useEffect(() => { if (pendingRegeneration) { + console.log('pendingRegeneration', pendingRegeneration, shotData[selectedIndex]?.lens); regenerateVideoSegment(); setPendingRegeneration(false); + setIsRegenerate(false); } - }, [shotData[selectedIndex]?.lens]); + }, [pendingRegeneration]); // 监听当前选中index变化 useEffect(() => { @@ -179,7 +181,9 @@ export const ShotTabContent = (props: ShotTabContentProps) => { ...shotData[selectedIndex], lens: shotInfo }); - setPendingRegeneration(true); + setTimeout(() => { + setPendingRegeneration(true); + }, 1000); }; // 新增分镜