fix: 收敛模板编辑发布契约并还原餐饮页面视觉
This commit is contained in:
1 parent
20bcb43534
commit
f4061a24bd
102 files changed
+4510
-870
No files matched your search
@@ -3,7 +3,7 @@ const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
Page({
|
||||
data: {
|
||||
brand: {},
|
||||
trustContent: {},
|
||||
trustPresentation: {},
|
||||
offerings: [],
|
||||
hero: { image: "", eyebrow: "", title: "", slogan: "", cta: "" },
|
||||
error: "",
|
||||
@@ -13,16 +13,18 @@ Page({
|
||||
.then((workspace) => {
|
||||
const brand = workspace.brand || {};
|
||||
const offerings = workspace.offerings || [];
|
||||
const credentials = (workspace.trustItems || []).filter(
|
||||
(item) => item.type === "credential",
|
||||
);
|
||||
const credential =
|
||||
credentials.find((item) => Object.keys(item.config || {}).length > 0) || credentials[0];
|
||||
const configuredHero =
|
||||
brand.homeHero && typeof brand.homeHero === "object" ? brand.homeHero : {};
|
||||
this.setData({
|
||||
brand,
|
||||
trustContent: {
|
||||
trustPresentation: {
|
||||
...(workspace.trustPresentation || {}),
|
||||
bio:
|
||||
workspace.trustPresentation?.bio ||
|
||||
(workspace.trustItems || []).find((item) => item.type === "credential")?.content ||
|
||||
"",
|
||||
bio: credential?.content || "",
|
||||
},
|
||||
offerings,
|
||||
hero: {
|
||||
@@ -30,7 +32,7 @@ Page({
|
||||
image: brand.heroImage || "",
|
||||
eyebrow: brand.tagline || brand.name,
|
||||
title: (offerings[0] && offerings[0].name) || brand.name,
|
||||
slogan: brand.description || "",
|
||||
slogan: workspace.templateData?.designPhilosophy || brand.description || "",
|
||||
...configuredHero,
|
||||
image: brand.heroImage || "",
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user