fix: 收敛模板编辑发布契约并还原餐饮页面视觉
This commit is contained in:
1 parent
20bcb43534
commit
f4061a24bd
102 files changed
+4510
-870
No files matched your search
@@ -29,7 +29,7 @@ function normalizeWorkspace(workspace) {
|
||||
const offerings = Array.isArray(workspace && workspace.offerings)
|
||||
? workspace.offerings.map(toOffering)
|
||||
: [];
|
||||
const trustContent =
|
||||
const trustPresentation =
|
||||
workspace && workspace.trustPresentation && typeof workspace.trustPresentation === "object"
|
||||
? workspace.trustPresentation
|
||||
: {};
|
||||
@@ -43,7 +43,7 @@ function normalizeWorkspace(workspace) {
|
||||
...workspace,
|
||||
brand,
|
||||
offerings,
|
||||
trustContent,
|
||||
trustPresentation,
|
||||
trustItems,
|
||||
plugins: Array.isArray(workspace.plugins) ? workspace.plugins : [],
|
||||
};
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
function prepareTrustItems(items) {
|
||||
if (!Array.isArray(items)) return [];
|
||||
return items.map((item) => ({
|
||||
...item,
|
||||
...(item.type === "process"
|
||||
? {
|
||||
lines:
|
||||
typeof item.content === "string"
|
||||
? item.content
|
||||
.split(/\r?\n/)
|
||||
.map((line) => line.trim())
|
||||
.filter(Boolean)
|
||||
: [],
|
||||
}
|
||||
: {}),
|
||||
}));
|
||||
}
|
||||
|
||||
module.exports = { prepareTrustItems };
|
||||
Reference in new issue
Block a user