forked from 77media/video-flow
去掉多余的字段
This commit is contained in:
parent
25988af2c3
commit
2c4bb10a36
@ -151,8 +151,6 @@ export const useRoleServiceHook = (): UseRoleService => {
|
||||
name: keyword,
|
||||
/** 内容 */
|
||||
content: keyword,
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
})),
|
||||
}
|
||||
: role
|
||||
@ -170,8 +168,6 @@ export const useRoleServiceHook = (): UseRoleService => {
|
||||
name: keyword,
|
||||
/** 内容 */
|
||||
content: keyword,
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
})),
|
||||
});
|
||||
}
|
||||
|
||||
@ -100,8 +100,6 @@ export const useRoleShotServiceHook = (projectId: string,selectRole?:RoleEntity,
|
||||
videoUrl: scene.video_urls,// 保持为string[]类型
|
||||
status:scene.video_urls.length>0?1:0, // 默认为已完成状态
|
||||
lens: [],
|
||||
updatedAt: Date.now(),
|
||||
loadingProgress: 100,
|
||||
selected: false,
|
||||
applied: true // 由于是通过角色查询到的,所以都是已应用的
|
||||
}));
|
||||
|
||||
@ -132,8 +132,6 @@ export const useShotService = (): UseShotService => {
|
||||
status: newSegment.status,
|
||||
sketchUrl: newSegment.sketchUrl,
|
||||
lens: newSegment.lens,
|
||||
updatedAt: newSegment.updatedAt,
|
||||
loadingProgress: newSegment.loadingProgress,
|
||||
});
|
||||
} else {
|
||||
existingSegmentsMap.set(newSegment.id, newSegment);
|
||||
@ -197,7 +195,6 @@ export const useShotService = (): UseShotService => {
|
||||
? {
|
||||
...segment,
|
||||
status: 0, // 设置为视频加载中状态
|
||||
loadingProgress: 0 // 重置加载进度
|
||||
}
|
||||
: segment
|
||||
)
|
||||
|
||||
@ -154,8 +154,6 @@ export class VideoSegmentEntityAdapter {
|
||||
// 创建VideoSegmentEntity
|
||||
const entity: VideoSegmentEntity = {
|
||||
id: `video_mock_${index}`, // 生成临时ID,包含索引
|
||||
updatedAt: Date.now(),
|
||||
loadingProgress: status === 1 ? 100 : status === 0 ? 50 : 0, // 已完成100%,进行中50%,失败0%
|
||||
name: `视频片段_${index}`, // 生成临时名称,包含索引
|
||||
sketchUrl: "", // 后端数据中没有sketchUrl,设为空字符串
|
||||
videoUrl: result.videos,
|
||||
|
||||
@ -11,17 +11,14 @@ import { ContentItem, LensType, TagValueObject } from "./valueObject";
|
||||
export interface BaseEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 更新时间 */
|
||||
readonly updatedAt: number;
|
||||
|
||||
/**loading进度 0-100 */
|
||||
loadingProgress: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* AI文本实体接口
|
||||
*/
|
||||
export interface AITextEntity extends BaseEntity {
|
||||
export interface AITextEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 文本内容 */
|
||||
content: string;
|
||||
}
|
||||
@ -29,7 +26,9 @@ export interface AITextEntity extends BaseEntity {
|
||||
/**
|
||||
* 角色实体接口
|
||||
*/
|
||||
export interface RoleEntity extends BaseEntity {
|
||||
export interface RoleEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 角色名称 */
|
||||
name: string;
|
||||
/** 角色提示词 */
|
||||
@ -47,7 +46,9 @@ export interface RoleEntity extends BaseEntity {
|
||||
/**
|
||||
* 场景实体接口
|
||||
*/
|
||||
export interface SceneEntity extends BaseEntity {
|
||||
export interface SceneEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 场景名称 */
|
||||
name: string;
|
||||
/** 场景图片URL */
|
||||
@ -61,7 +62,9 @@ export interface SceneEntity extends BaseEntity {
|
||||
/**
|
||||
* 视频片段实体接口
|
||||
*/
|
||||
export interface VideoSegmentEntity extends BaseEntity {
|
||||
export interface VideoSegmentEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 视频片段名称 */
|
||||
name: string;
|
||||
/**视频片段草图Url */
|
||||
@ -70,7 +73,7 @@ export interface VideoSegmentEntity extends BaseEntity {
|
||||
videoUrl: {
|
||||
video_url: string;
|
||||
video_id: string;
|
||||
video_status: number|null;
|
||||
video_status: number | null;
|
||||
}[];
|
||||
/**视频片段状态 0:视频加载中 1:任务已完成 2:任务失败 */
|
||||
status: number;
|
||||
@ -84,18 +87,20 @@ export interface VideoSegmentEntity extends BaseEntity {
|
||||
*/
|
||||
export enum ImageStoryType {
|
||||
/** 空文案自动生成故事 */
|
||||
autoStory = 'autoStory',
|
||||
autoStory = "autoStory",
|
||||
/** 用户描述生成故事 */
|
||||
userStory = 'userStory',
|
||||
userStory = "userStory",
|
||||
/** 模板故事 */
|
||||
templateStory = 'templateStory',
|
||||
templateStory = "templateStory",
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片故事实体接口
|
||||
* @description 表示一条图片故事及其相关信息
|
||||
*/
|
||||
export interface ImageStoryEntity extends BaseEntity {
|
||||
export interface ImageStoryEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 图片URL */
|
||||
imageUrl: string;
|
||||
/** 图片描述 */
|
||||
@ -109,3 +114,18 @@ export interface ImageStoryEntity extends BaseEntity {
|
||||
/** 故事类型 */
|
||||
storyType: ImageStoryType;
|
||||
}
|
||||
|
||||
export interface StoryTemplateEntity {
|
||||
/** 唯一标识 */
|
||||
readonly id: string;
|
||||
/** 故事模板名称 */
|
||||
name: string;
|
||||
/** 故事模板描述 */
|
||||
description: string;
|
||||
/** 故事模板图片 */
|
||||
imageUrl: string;
|
||||
/** 故事模板提示词 */
|
||||
generateText: string;
|
||||
/**故事角色 */
|
||||
storyRole: RoleEntity[];
|
||||
}
|
||||
|
||||
@ -89,13 +89,9 @@ export interface TagValueObject {
|
||||
name: string;
|
||||
/** 内容标签类型 */
|
||||
content: number | string;
|
||||
/**loading进度 0-100 */
|
||||
loadingProgress: number;
|
||||
|
||||
/** 颜色 */
|
||||
color?: string;
|
||||
/** 更新时间 */
|
||||
readonly updatedAt: number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -71,8 +71,6 @@ export class RoleEditUseCase {
|
||||
generateText: char.character_description || '',
|
||||
tags: [], // 默认为空标签数组
|
||||
imageUrl: char.image_path || '', // 使用API返回的图片路径
|
||||
loadingProgress: 100, // 默认加载完成
|
||||
updatedAt: Date.now(),
|
||||
fromDraft: false,
|
||||
isChangeRole: false
|
||||
};
|
||||
@ -107,7 +105,6 @@ export class RoleEditUseCase {
|
||||
...draftRoleList[char.character_name],
|
||||
fromDraft: true,
|
||||
id: `role_${index + 1}`,
|
||||
updatedAt: Date.now(),
|
||||
};
|
||||
}
|
||||
/** 角色实体对象 */
|
||||
@ -118,17 +115,13 @@ export class RoleEditUseCase {
|
||||
tags: Array.isArray(char.highlights)
|
||||
? char.highlights.map((highlight: string) => ({
|
||||
id: `tag_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
||||
updatedAt: Date.now(),
|
||||
/** 名称 */
|
||||
name: highlight,
|
||||
/** 内容 */
|
||||
content: highlight,
|
||||
loadingProgress: 100,
|
||||
}))
|
||||
: [],
|
||||
imageUrl: char.image_path || '',
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
fromDraft: false,
|
||||
isChangeRole: false
|
||||
};
|
||||
@ -158,8 +151,6 @@ export class RoleEditUseCase {
|
||||
generateText: char.brief || '',
|
||||
tags: [], // 相似角色接口可能不返回标签,暂时为空
|
||||
imageUrl: char.avatar || '',
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
fromDraft: false,
|
||||
isChangeRole: false
|
||||
};
|
||||
@ -245,14 +236,10 @@ export class RoleEditUseCase {
|
||||
generateText: characterData.character_description,
|
||||
tags: (characterData.highlights || []).map(highlight => ({
|
||||
id: `tag_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
||||
updatedAt: Date.now(),
|
||||
name: highlight,
|
||||
content: highlight,
|
||||
loadingProgress: 100,
|
||||
})), // 将高亮关键词转换为TagValueObject格式
|
||||
imageUrl: characterData.image_url || '',
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
fromDraft: false,
|
||||
isChangeRole: true
|
||||
};
|
||||
@ -434,8 +421,6 @@ export class RoleEditUseCase {
|
||||
name: highlight,
|
||||
/** 内容 */
|
||||
content: highlight,
|
||||
loadingProgress: 100,
|
||||
updatedAt: Date.now(),
|
||||
})),
|
||||
};
|
||||
|
||||
|
||||
@ -129,8 +129,6 @@ export function ShotTabContent({
|
||||
imageUrl: person.imageUrl,
|
||||
fromDraft: false, // 默认不是来自草稿箱
|
||||
isChangeRole: true, // 默认没有发生角色形象的变更
|
||||
updatedAt: Date.now(), // 使用当前时间戳
|
||||
loadingProgress: 100 // 已完成加载
|
||||
};
|
||||
console.log('role', role);
|
||||
setSelectedRole(role);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user