视频比例 传参问题

This commit is contained in:
北枳 2025-09-22 16:13:21 +08:00
parent 444335436b
commit b41ff70ccd
7 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,5 @@
import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'
/**
* AI分析返回DTO
*/
@ -107,7 +109,7 @@ export interface CreateMovieProjectV2Request {
/** 图片URL */
image_url: string;
/** 画面比例(横/竖屏) */
aspect_ratio?: "16:9" | "9:16";
aspect_ratio?: AspectRatioValue;
}
/**
@ -252,7 +254,7 @@ export interface CreateMovieProjectV3Request {
photo_url: string;
}[];
/** 画面比例(横/竖屏) */
aspect_ratio?: "16:9" | "9:16";
aspect_ratio?: AspectRatioValue;
}
/**

View File

@ -14,6 +14,7 @@ import {
CreateMovieProjectResponse,
} from "@/api/DTO/movie_start_dto";
import { MovieProjectService, MovieProjectMode } from "./MovieProjectService";
import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'
interface UseImageStoryService {
/** 当前图片故事数据 */
@ -58,7 +59,7 @@ interface UseImageStoryService {
mode?: "auto" | "manual",
resolution?: "720p" | "1080p" | "4k",
language?: string,
aspectRatio?: "16:9" | "9:16"
aspectRatio?: AspectRatioValue
) => Promise<{ project_id: string } | undefined>;
/** 设置角色分析 */
setCharactersAnalysis: Dispatch<SetStateAction<CharacterAnalysis[]>>;
@ -459,7 +460,7 @@ export const useImageStoryServiceHook = (): UseImageStoryService => {
mode: "auto" | "manual" = "auto",
resolution: "720p" | "1080p" | "4k" = "720p",
language: string = "English",
aspectRatio?: "16:9" | "9:16"
aspectRatio?: AspectRatioValue
) => {
try {
if (hasAnalyzed) {

View File

@ -6,6 +6,7 @@ import { useState, useCallback, useMemo } from "react";
import { generateTextToImage } from "@/api/movie_start";
import { MovieProjectService, MovieProjectMode } from "./MovieProjectService";
import { CreateMovieProjectV3Request } from "@/api/DTO/movie_start_dto";
import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'
interface UseTemplateStoryService {
/** 模板列表 */
@ -29,7 +30,7 @@ interface UseTemplateStoryService {
mode: "auto" | "manual",
resolution: "720p" | "1080p" | "4k",
language: string,
aspectRatio?: "16:9" | "9:16"
aspectRatio?: AspectRatioValue
) => Promise<string | undefined>;
/** 设置选中的模板 */
setSelectedTemplate: (template: StoryTemplateEntity | null) => void;
@ -252,7 +253,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => {
mode: "auto" | "manual" = "auto",
resolution: "720p" | "1080p" | "4k" = "720p",
language: string = "English",
aspectRatio?: "16:9" | "9:16"
aspectRatio?: AspectRatioValue
) => {
console.log('selectedTemplate', selectedTemplate)
try {

View File

@ -120,7 +120,7 @@ export const H5PhotoStoryDrawer = ({
configOptions.mode as "auto" | "manual",
configOptions.resolution as "720p" | "1080p" | "4k",
configOptions.language,
aspectUI === 'VIDEO_ASPECT_RATIO_LANDSCAPE' ? '16:9' : '9:16'
aspectUI as AspectRatioValue
);
if (!episodeResponse) return;
const episodeId = episodeResponse.project_id;

View File

@ -123,7 +123,7 @@ export const H5TemplateDrawer = ({
configOptions.mode,
configOptions.resolution,
configOptions.language,
aspectUI === 'VIDEO_ASPECT_RATIO_LANDSCAPE' ? '16:9' : '9:16'
aspectUI as AspectRatioValue
);
if (projectId) {

View File

@ -106,7 +106,7 @@ export const PcPhotoStoryModal = ({
configOptions.mode as "auto" | "manual",
configOptions.resolution as "720p" | "1080p" | "4k",
configOptions.language,
aspectUI === 'VIDEO_ASPECT_RATIO_LANDSCAPE' ? '16:9' : '9:16'
aspectUI as AspectRatioValue
);
if (!episodeResponse) return;
const episodeId = episodeResponse.project_id;

View File

@ -183,7 +183,7 @@ export const PcTemplateModal = ({
configOptions.mode,
configOptions.resolution,
configOptions.language,
aspectUI === 'VIDEO_ASPECT_RATIO_LANDSCAPE' ? '16:9' : '9:16'
aspectUI as AspectRatioValue
);
if (projectId) {