From 65b2ebaf65188159422870cf9d1e0e9b81b05975 Mon Sep 17 00:00:00 2001 From: zhishi <1951671751@qq.com> Date: Tue, 7 Apr 2026 04:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/workbench/getGenerateData.ts | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/routes/production/workbench/getGenerateData.ts b/src/routes/production/workbench/getGenerateData.ts index a67998e..07dd843 100644 --- a/src/routes/production/workbench/getGenerateData.ts +++ b/src/routes/production/workbench/getGenerateData.ts @@ -50,7 +50,7 @@ export default router.post( i.filePath = i.filePath ? await u.oss.getFileUrl(i.filePath) : ""; }), ); - const storyboardTrackRecord:Record = {}; + const storyboardTrackRecord: Record = {}; storyboardList.forEach((i) => { if (storyboardTrackRecord[i.trackId!]) { storyboardTrackRecord[i.trackId!].push({ @@ -61,13 +61,15 @@ export default router.post( ...(i.id != null ? { id: i.id } : {}), }); } else { - storyboardTrackRecord[i.trackId!] = [{ - src: i.filePath, - fileType: "image", - sources: "storyboard", - ...(i.prompt != null ? { prompt: i.videoDesc } : {}), - ...(i.id != null ? { id: i.id } : {}), - }]; + storyboardTrackRecord[i.trackId!] = [ + { + src: i.filePath, + fileType: "image", + sources: "storyboard", + ...(i.prompt != null ? { prompt: i.videoDesc } : {}), + ...(i.id != null ? { id: i.id } : {}), + }, + ]; } }); // 按 storyboardId 分组的资产数据,key 为 storyboardId @@ -88,7 +90,7 @@ export default router.post( name: i.name, describe: i.describe, type: i.type, - fileType: "image" as const, + fileType: "image" as const, sources: "assets", src: i.filePath ? await u.oss.getFileUrl(i.filePath) : "", }; @@ -143,7 +145,7 @@ export default router.post( storyboardList: await Promise.all( storyboardList.map(async (s) => ({ ...s, - src: s.filePath ? await u.oss.getFileUrl(s.filePath) : "", + src: s.filePath, })), ), trackList,