From 1f63a470c70046fb9d7ce7211aa5c04f261d79b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E9=BE=99?= Date: Tue, 26 Aug 2025 23:30:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=A8=A1=E6=9D=BF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/Interaction/templateStoryService.ts | 4 ++++ components/ChatInputBox/ChatInputBox.tsx | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/service/Interaction/templateStoryService.ts b/app/service/Interaction/templateStoryService.ts index 8357268..1797609 100644 --- a/app/service/Interaction/templateStoryService.ts +++ b/app/service/Interaction/templateStoryService.ts @@ -313,6 +313,10 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { }; console.log("params", params); const result = await createMovieProjectV3(params); + if((result.data as unknown) === 'message'){ + message.error(result.message); + return; + } return result.data.project_id as string; } catch (error) { console.error("创建电影项目失败:", error); diff --git a/components/ChatInputBox/ChatInputBox.tsx b/components/ChatInputBox/ChatInputBox.tsx index 4b3e669..13b4c88 100644 --- a/components/ChatInputBox/ChatInputBox.tsx +++ b/components/ChatInputBox/ChatInputBox.tsx @@ -130,7 +130,7 @@ const RenderTemplateStoryMode = ({ clearInterval(timer); return 95; } - return prev + 1; + return prev + 0.1; }); }, 100); try { @@ -151,15 +151,20 @@ const RenderTemplateStoryMode = ({ if (projectId) { // 跳转到电影详情页 router.push(`/create/work-flow?episodeId=${projectId}`); + onClose(); + // 重置状态 + setSelectedTemplate(null); + setActiveRoleIndex(0); } console.log("Story action created:", projectId); + + } catch (error) { + console.error("Failed to create story action:", error); + // 这里可以添加 toast 提示 onClose(); // 重置状态 setSelectedTemplate(null); setActiveRoleIndex(0); - } catch (error) { - console.error("Failed to create story action:", error); - // 这里可以添加 toast 提示 } finally { setLocalLoading(0); clearInterval(timer); @@ -556,7 +561,7 @@ const RenderTemplateStoryMode = ({ style={{ maxWidth: "800px", marginTop: "0vh" }} className="photo-story-modal !pb-0 rounded-lg bg-white/[0.08] backdrop-blur-[20px] [&_.ant-modal-content]:bg-white/[0.00]" > - +
{/* 弹窗头部 */}