fix: 收敛模板编辑发布契约并还原餐饮页面视觉

This commit is contained in:
que01 committed 2026-10-08 13:36:59 +08:00
1 parent 20bcb43534
commit f4061a24bd
102 files changed
+4510 -870

No files matched your search

@@ -5,7 +5,12 @@ Page({
data: { brand: {}, records: [], error: "" },
onLoad() {
loadWorkspaceWithFallback()
.then((workspace) => this.setData({ brand: workspace.brand || {} }))
.then((workspace) =>
this.setData({
brand: workspace.brand || {},
trustItems: workspace.trustItems || [],
}),
)
.catch((error) => this.setData({ error: error.message }));
},
onShow() {
@@ -1,4 +1,4 @@
<view class="page">
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
<linjing-profile wx:else brand="{{brand}}" presentation="{{brand.visualPresentation.profile}}" records-count="{{records.length}}" bind:call="call" bind:copy="copyWechat" bind:records="recordsPage" />
<linjing-profile wx:else brand="{{brand}}" trust-items="{{trustItems}}" presentation="{{brand.visualPresentation.profile}}" records-count="{{records.length}}" bind:call="call" bind:copy="copyWechat" bind:records="recordsPage" />
</view>
@@ -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 || "",
},
@@ -1,4 +1,4 @@
<view class="page">
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
<linjing-home wx:else brand="{{brand}}" presentation="{{brand.visualPresentation.home}}" hero="{{hero}}" trust-content="{{trustContent}}" offerings="{{offerings}}" bind:select="selectOffering" bind:works="goWorks" />
<linjing-home wx:else brand="{{brand}}" presentation="{{brand.visualPresentation.home}}" hero="{{hero}}" trust-presentation="{{trustPresentation}}" offerings="{{offerings}}" bind:select="selectOffering" bind:works="goWorks" />
</view>