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]" > - +
{/* 弹窗头部 */}