修复bug
This commit is contained in:
parent
f4d8fe7883
commit
65b2ebaf65
@ -50,7 +50,7 @@ export default router.post(
|
|||||||
i.filePath = i.filePath ? await u.oss.getFileUrl(i.filePath) : "";
|
i.filePath = i.filePath ? await u.oss.getFileUrl(i.filePath) : "";
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
const storyboardTrackRecord:Record<number,any[]> = {};
|
const storyboardTrackRecord: Record<number, any[]> = {};
|
||||||
storyboardList.forEach((i) => {
|
storyboardList.forEach((i) => {
|
||||||
if (storyboardTrackRecord[i.trackId!]) {
|
if (storyboardTrackRecord[i.trackId!]) {
|
||||||
storyboardTrackRecord[i.trackId!].push({
|
storyboardTrackRecord[i.trackId!].push({
|
||||||
@ -61,13 +61,15 @@ export default router.post(
|
|||||||
...(i.id != null ? { id: i.id } : {}),
|
...(i.id != null ? { id: i.id } : {}),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
storyboardTrackRecord[i.trackId!] = [{
|
storyboardTrackRecord[i.trackId!] = [
|
||||||
src: i.filePath,
|
{
|
||||||
fileType: "image",
|
src: i.filePath,
|
||||||
sources: "storyboard",
|
fileType: "image",
|
||||||
...(i.prompt != null ? { prompt: i.videoDesc } : {}),
|
sources: "storyboard",
|
||||||
...(i.id != null ? { id: i.id } : {}),
|
...(i.prompt != null ? { prompt: i.videoDesc } : {}),
|
||||||
}];
|
...(i.id != null ? { id: i.id } : {}),
|
||||||
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 按 storyboardId 分组的资产数据,key 为 storyboardId
|
// 按 storyboardId 分组的资产数据,key 为 storyboardId
|
||||||
@ -88,7 +90,7 @@ export default router.post(
|
|||||||
name: i.name,
|
name: i.name,
|
||||||
describe: i.describe,
|
describe: i.describe,
|
||||||
type: i.type,
|
type: i.type,
|
||||||
fileType: "image" as const,
|
fileType: "image" as const,
|
||||||
sources: "assets",
|
sources: "assets",
|
||||||
src: i.filePath ? await u.oss.getFileUrl(i.filePath) : "",
|
src: i.filePath ? await u.oss.getFileUrl(i.filePath) : "",
|
||||||
};
|
};
|
||||||
@ -143,7 +145,7 @@ export default router.post(
|
|||||||
storyboardList: await Promise.all(
|
storyboardList: await Promise.all(
|
||||||
storyboardList.map(async (s) => ({
|
storyboardList.map(async (s) => ({
|
||||||
...s,
|
...s,
|
||||||
src: s.filePath ? await u.oss.getFileUrl(s.filePath) : "",
|
src: s.filePath,
|
||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
trackList,
|
trackList,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user