This commit is contained in:
ACT丶流星雨 2026-03-26 22:13:55 +08:00
commit b32017d669
3 changed files with 4 additions and 2 deletions

View File

@ -29,7 +29,8 @@ export default router.post(
}),
async (req, res) => {
const { scriptId, projectId, storyboardId, prompt, data, model, duration, resolution, audio, mode } = req.body;
//获取生成视频比例
const ratio = await u.db("o_project").select("videoRatio").where("id", projectId).first();
const videoPath = `/${projectId}/video/${uuidv4()}.mp4`; //视频保存路径
//新增
const videoData = {
@ -109,6 +110,7 @@ export default router.post(
imageBase64: base64.filter((item) => item !== null) as string[],
mode,
duration,
aspectRatio: (ratio?.videoRatio as `${number}:${number}`) || "16:9",
resolution,
audio,
taskClass: "视频生成",

View File

@ -14,7 +14,6 @@ export default router.post(
async (req, res) => {
const { scriptId, specifyIds } = req.body;
const data = await u.db("o_video").where("scriptId", scriptId).whereIn("id", specifyIds).andWhere("state", "生成中").select("*");
console.log("%c Line:17 🧀 data", "background:#93c0a4", data.length);
res.status(200).send(success(data));
},
);

View File

@ -30,6 +30,7 @@ export default function runCode(code: string) {
urlToBase64,
mergeImages,
pollTask,
fetch,
exports,
axios,
FormData,