完善flow
This commit is contained in:
parent
cf45ec655c
commit
a2ef1db88a
@ -12,7 +12,6 @@ export default router.post(
|
|||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { id } = req.body;
|
const { id } = req.body;
|
||||||
console.log("%c Line:15 🥤 id", "background:#e41a6a", id);
|
|
||||||
const storyboardFlowData = await u.db("o_storyboardFlow").where("stroryboardId", id).first();
|
const storyboardFlowData = await u.db("o_storyboardFlow").where("stroryboardId", id).first();
|
||||||
if (storyboardFlowData?.flowData) {
|
if (storyboardFlowData?.flowData) {
|
||||||
const parseFlow = JSON.parse(storyboardFlowData.flowData);
|
const parseFlow = JSON.parse(storyboardFlowData.flowData);
|
||||||
|
|||||||
@ -27,6 +27,7 @@ export default router.post(
|
|||||||
});
|
});
|
||||||
const [id] = await u.db("o_storyboard").insert({
|
const [id] = await u.db("o_storyboard").insert({
|
||||||
filePath: new URL(imageUrl).pathname,
|
filePath: new URL(imageUrl).pathname,
|
||||||
|
createTime: Date.now(),
|
||||||
});
|
});
|
||||||
await u.db("o_storyboardFlow").insert({
|
await u.db("o_storyboardFlow").insert({
|
||||||
stroryboardId: id,
|
stroryboardId: id,
|
||||||
|
|||||||
@ -18,7 +18,8 @@ export default router.post(
|
|||||||
storyboardData.map(async (i) => {
|
storyboardData.map(async (i) => {
|
||||||
return {
|
return {
|
||||||
...i,
|
...i,
|
||||||
image: i.filePath ? await u.oss.getFileUrl(i.filePath!) : "",
|
title: i.name,
|
||||||
|
src: i.filePath ? await u.oss.getFileUrl(i.filePath!) : "",
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user