forked from 77media/video-flow
Merge branch '20251014-fix-video-path' into dev
This commit is contained in:
commit
fcfbcb9977
@ -367,6 +367,8 @@ export interface VideoFlowProjectResponse {
|
||||
data: ProjectContentData;
|
||||
/** 最终简单视频 */
|
||||
final_simple_video: string;
|
||||
/** 最终简单视频封面图 */
|
||||
final_simple_video_snapshot_url: string;
|
||||
/** 最终视频 */
|
||||
final_video: string;
|
||||
/** 画面比例 */
|
||||
|
||||
@ -290,7 +290,7 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
|
||||
video_id: video.video_id,
|
||||
video_status: video_status, // 0 生成中 1 生成完成 2 生成失败
|
||||
type: 'video',
|
||||
snapshot_url: video.snapshot_url
|
||||
snapshot_url: video.snapshot_urls?.[0] || ''
|
||||
});
|
||||
}
|
||||
taskCurrent.videos.data = videoList;
|
||||
@ -415,7 +415,7 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
|
||||
throw new Error(response.message);
|
||||
}
|
||||
|
||||
const { status, data, tags, mode, original_text, aspect_ratio, name, final_simple_video, final_video } = response.data;
|
||||
const { status, data, tags, mode, original_text, aspect_ratio, name, final_simple_video, final_simple_video_snapshot_url, final_video } = response.data;
|
||||
|
||||
const { current: taskCurrent } = tempTaskObject;
|
||||
|
||||
@ -532,10 +532,11 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
|
||||
if (final_simple_video) {
|
||||
taskCurrent.currentStage = 'final_video';
|
||||
taskCurrent.final.url = final_simple_video;
|
||||
taskCurrent.final.snapshot_url = final_simple_video_snapshot_url;
|
||||
taskCurrent.final.note = 'simple';
|
||||
taskCurrent.status = 'COMPLETED';
|
||||
}
|
||||
|
||||
|
||||
if (final_video) {
|
||||
taskCurrent.currentStage = 'final_video';
|
||||
taskCurrent.final.url = final_video;
|
||||
@ -555,7 +556,7 @@ export function useWorkflowData({}: UseWorkflowDataProps = {}) {
|
||||
originalText: original_text,
|
||||
isLoading: false
|
||||
});
|
||||
// 设置步骤
|
||||
// 设置步骤
|
||||
setTaskObject(prev => {
|
||||
const newState = JSON.parse(JSON.stringify({...prev, ...taskCurrent}));
|
||||
return newState;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user