添加查询资产子资产图片获取url地址
This commit is contained in:
parent
3276383dec
commit
ec6ddfa7e7
@ -43,11 +43,19 @@ export default router.post(
|
|||||||
}
|
}
|
||||||
const childAssets = await childQuery;
|
const childAssets = await childQuery;
|
||||||
|
|
||||||
|
// 为每个子资产添加图片地址
|
||||||
|
const childAssetsWithSrc = await Promise.all(
|
||||||
|
childAssets.map(async (child) => ({
|
||||||
|
...child,
|
||||||
|
src: child.filePath && (await u.oss.getFileUrl(child.filePath!)),
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
|
||||||
// 为每个父资产添加子资产
|
// 为每个父资产添加子资产
|
||||||
const result = await Promise.all(
|
const result = await Promise.all(
|
||||||
parentAssets.map(async (parent) => ({
|
parentAssets.map(async (parent) => ({
|
||||||
...parent,
|
...parent,
|
||||||
sonAssets: childAssets.filter((child) => child.assetsId === parent.id),
|
sonAssets: childAssetsWithSrc.filter((child) => child.assetsId === parent.id),
|
||||||
src: parent.filePath && (await u.oss.getFileUrl(parent.filePath!)),
|
src: parent.filePath && (await u.oss.getFileUrl(parent.filePath!)),
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -103,7 +103,6 @@ export default router.post(
|
|||||||
3. 视频风格应与用户指定的模式数据相匹配,包括色彩、音乐、特效等元素。
|
3. 视频风格应与用户指定的模式数据相匹配,包括色彩、音乐、特效等元素。
|
||||||
4. 视频中应包含用户提供的图片,并在视频中适当展示,以增强视频的视觉效果。
|
4. 视频中应包含用户提供的图片,并在视频中适当展示,以增强视频的视觉效果。
|
||||||
5. 如果用户指定了音频,请确保视频中的音频与视频内容相匹配,符合用户的创意意图。`;
|
5. 如果用户指定了音频,请确保视频中的音频与视频内容相匹配,符合用户的创意意图。`;
|
||||||
console.log("%c Line:110 🍑 prompt", "background:#b03734", prompt);
|
|
||||||
|
|
||||||
const aiVideo = u.Ai.Video(model);
|
const aiVideo = u.Ai.Video(model);
|
||||||
await aiVideo.run(
|
await aiVideo.run(
|
||||||
|
|||||||
4
src/types/database.d.ts
vendored
4
src/types/database.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
// @db-hash 93b2462070c45c2b449e9a18c4e88763
|
// @db-hash 6be0a80e9c8f541987a4c1e907736237
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
export interface memories {
|
export interface memories {
|
||||||
@ -178,6 +178,7 @@ export interface o_storyboard {
|
|||||||
'sound'?: string | null;
|
'sound'?: string | null;
|
||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'title'?: string | null;
|
'title'?: string | null;
|
||||||
|
'videoPrompt'?: string | null;
|
||||||
}
|
}
|
||||||
export interface o_tasks {
|
export interface o_tasks {
|
||||||
'describe'?: string | null;
|
'describe'?: string | null;
|
||||||
@ -211,6 +212,7 @@ export interface o_video {
|
|||||||
'errorReason'?: string | null;
|
'errorReason'?: string | null;
|
||||||
'filePath'?: string | null;
|
'filePath'?: string | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
|
'projectId'?: number | null;
|
||||||
'scriptId'?: number | null;
|
'scriptId'?: number | null;
|
||||||
'state'?: string | null;
|
'state'?: string | null;
|
||||||
'storyboardId'?: number | null;
|
'storyboardId'?: number | null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user