forked from 77media/video-flow
换创建任务接口
This commit is contained in:
parent
b97c867ac3
commit
ab3eecc3ea
@ -738,6 +738,8 @@ export const createMovieProjectV1 = async (request: {
|
|||||||
resolution: "720p" | "1080p" | "4k";
|
resolution: "720p" | "1080p" | "4k";
|
||||||
/** 语言 */
|
/** 语言 */
|
||||||
language: string;
|
language: string;
|
||||||
|
/** 视频时长 */
|
||||||
|
video_duration: string;
|
||||||
}) => {
|
}) => {
|
||||||
return post<ApiResponse<{
|
return post<ApiResponse<{
|
||||||
/** 项目ID */
|
/** 项目ID */
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import { AudioRecorder } from "./AudioRecorder";
|
|||||||
import { useTemplateStoryServiceHook } from "@/app/service/Interaction/templateStoryService";
|
import { useTemplateStoryServiceHook } from "@/app/service/Interaction/templateStoryService";
|
||||||
import { createScriptEpisodeNew } from "@/api/script_episode";
|
import { createScriptEpisodeNew } from "@/api/script_episode";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { createMovieProjectV1 } from "@/api/video_flow";
|
||||||
|
|
||||||
// 自定义音频播放器样式
|
// 自定义音频播放器样式
|
||||||
const customAudioPlayerStyles = `
|
const customAudioPlayerStyles = `
|
||||||
@ -567,7 +568,7 @@ export function ChatInputBox() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 调用创建剧集API
|
// 调用创建剧集API
|
||||||
const episodeResponse = await createScriptEpisodeNew(episodeData);
|
const episodeResponse = await createMovieProjectV1(episodeData);
|
||||||
console.log('episodeResponse', episodeResponse);
|
console.log('episodeResponse', episodeResponse);
|
||||||
if (episodeResponse.code !== 0) {
|
if (episodeResponse.code !== 0) {
|
||||||
console.error(`创建剧集失败: ${episodeResponse.message}`);
|
console.error(`创建剧集失败: ${episodeResponse.message}`);
|
||||||
|
|||||||
@ -267,7 +267,6 @@ export function ThumbnailGrid({
|
|||||||
<div className="absolute inset-0 bg-black/10 flex items-center justify-center z-20">
|
<div className="absolute inset-0 bg-black/10 flex items-center justify-center z-20">
|
||||||
<div className="text-blue-500 text-xl font-bold flex items-center gap-2">
|
<div className="text-blue-500 text-xl font-bold flex items-center gap-2">
|
||||||
<Loader2 className="w-10 h-10 animate-spin" />
|
<Loader2 className="w-10 h-10 animate-spin" />
|
||||||
<span>Generating...</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -275,7 +274,6 @@ export function ThumbnailGrid({
|
|||||||
<div className="absolute inset-0 bg-red-500/10 flex items-center justify-center z-20">
|
<div className="absolute inset-0 bg-red-500/10 flex items-center justify-center z-20">
|
||||||
<div className="text-red-500 text-xl font-bold flex items-center gap-2">
|
<div className="text-red-500 text-xl font-bold flex items-center gap-2">
|
||||||
<X className="w-10 h-10" />
|
<X className="w-10 h-10" />
|
||||||
<span>Failed</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -329,7 +327,6 @@ export function ThumbnailGrid({
|
|||||||
<div className="absolute inset-0 bg-black/10 flex items-center justify-center">
|
<div className="absolute inset-0 bg-black/10 flex items-center justify-center">
|
||||||
<div className="text-blue-500 text-xl font-bold flex items-center gap-2">
|
<div className="text-blue-500 text-xl font-bold flex items-center gap-2">
|
||||||
<Loader2 className="w-10 h-10 animate-spin" />
|
<Loader2 className="w-10 h-10 animate-spin" />
|
||||||
<span>Generating...</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -337,7 +334,6 @@ export function ThumbnailGrid({
|
|||||||
<div className="absolute inset-0 bg-red-500/10 flex items-center justify-center">
|
<div className="absolute inset-0 bg-red-500/10 flex items-center justify-center">
|
||||||
<div className="text-red-500 text-xl font-bold flex items-center gap-2">
|
<div className="text-red-500 text-xl font-bold flex items-center gap-2">
|
||||||
<X className="w-10 h-10" />
|
<X className="w-10 h-10" />
|
||||||
<span>Failed</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user