fix(*): 分镜生成设置 - 统一模型能力计价并支持项目默认模型

This commit is contained in:
ddCat
2026-08-30 13:02:55 +08:00
parent 2f818a8dde
commit f62ea62355
12 changed files with 342 additions and 68 deletions

View File

@@ -14,6 +14,8 @@ export type Project = {
coverResourceId?: string;
stylePresetId: string;
styleProfileJson?: string;
defaultImageModel?: string;
defaultVideoModel?: string;
status: "active" | "archived" | string;
revision: number;
createdAt: string;
@@ -411,11 +413,11 @@ function normalizeProjectDetail(detail: ProjectDetail): ProjectDetail {
};
}
export function createProject(input: { name: string; type: string; aspectRatio: string; sourceType: string; description?: string; stylePresetId?: string; styleProfileJson?: string }) {
export function createProject(input: { name: string; type: string; aspectRatio: string; sourceType: string; description?: string; stylePresetId?: string; styleProfileJson?: string; defaultImageModel?: string; defaultVideoModel?: string }) {
return request<{ project: Project }>(api.post("/projects", input));
}
export function updateProject(projectId: string, input: Partial<Pick<Project, "name" | "type" | "aspectRatio" | "sourceType" | "description" | "coverResourceId" | "stylePresetId" | "styleProfileJson" | "status">>) {
export function updateProject(projectId: string, input: Partial<Pick<Project, "name" | "type" | "aspectRatio" | "sourceType" | "description" | "coverResourceId" | "stylePresetId" | "styleProfileJson" | "defaultImageModel" | "defaultVideoModel" | "status">>) {
return request<{ project: Project }>(api.patch(`/projects/${encodeURIComponent(projectId)}`, input));
}