From f89b5cc75cf7ff6afd0a7610779cd6317c20b0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E9=BE=99?= Date: Sat, 9 Aug 2025 17:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E6=94=B6=E8=A7=92=E8=89=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/Interaction/ShotService.ts | 6 +++++- app/service/domain/valueObject.ts | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/service/Interaction/ShotService.ts b/app/service/Interaction/ShotService.ts index 46dea61..83f8035 100644 --- a/app/service/Interaction/ShotService.ts +++ b/app/service/Interaction/ShotService.ts @@ -1,7 +1,7 @@ import { useState, useCallback } from "react"; import { VideoSegmentEditUseCase } from "../usecase/ShotEditUsecase"; import { VideoSegmentEntity } from "../domain/Entities"; -import { LensType } from "../domain/valueObject"; +import { LensType, SimpleCharacter } from "../domain/valueObject"; import { getUploadToken, uploadToQiniu } from "@/api/common"; /** @@ -41,6 +41,8 @@ export interface UseShotService { deleteLens: (lensName: string) => void; /** 获取视频当前帧并上传到七牛云 */ filterRole: (video: HTMLVideoElement) => Promise; + /** 设置角色简单数据 */ + setSimpleCharacter: (characters: SimpleCharacter[]) => void; } /** @@ -54,6 +56,7 @@ export const useShotService = (): UseShotService => { const [videoSegments, setVideoSegments] = useState([]); const [selectedSegment, setSelectedSegment] = useState(null); const [projectId, setProjectId] = useState(""); + const [simpleCharacter, setSimpleCharacter] = useState([]); // UseCase实例 const [vidoEditUseCase] = useState( new VideoSegmentEditUseCase() @@ -309,5 +312,6 @@ export const useShotService = (): UseShotService => { addNewLens, deleteLens, filterRole, + setSimpleCharacter }; }; diff --git a/app/service/domain/valueObject.ts b/app/service/domain/valueObject.ts index c798ed5..331baa6 100644 --- a/app/service/domain/valueObject.ts +++ b/app/service/domain/valueObject.ts @@ -402,3 +402,16 @@ export class ScriptValueObject { return this.scriptText; } } + +/** + * 角色简单数据接口 + * @description 包含角色姓名、图片和描述 + */ +export interface SimpleCharacter { + /** 姓名 */ + name: string; + /** 图片URL */ + imageUrl: string; + /** 角色描述 */ + description: string; +}