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

@@ -3,7 +3,7 @@ Component({
brand: { type: Object, value: {} },
presentation: { type: Object, value: {} },
hero: { type: Object, value: {} },
trustContent: { type: Object, value: {} },
trustPresentation: { type: Object, value: {} },
offerings: { type: Array, value: [] },
},
data: { resolvedHeroImage: "" },
@@ -1,8 +1,8 @@
<view class="page">
<view class="founder-card"><image class="avatar" src="{{brand.avatarUrl}}" mode="aspectFill"/><view class="founder-copy"><text class="founder-name">{{brand.founder}}</text><text class="founder-title">{{brand.title}}</text><text class="quote">“{{brand.slogan}}”</text></view><text class="badge">{{presentation.founderBadge}}</text></view>
<view class="hero" bindtap="goWorks"><image class="hero-image" src="{{resolvedHeroImage}}" mode="aspectFill"/><view class="hero-shade"/><view class="hero-copy"><text class="eyebrow">{{hero.eyebrow}}</text><text class="hero-title">{{hero.title}}</text><text class="hero-slogan">{{hero.slogan}}</text><text class="hero-button">{{hero.cta}}</text></view></view>
<view class="intro"><text class="eyebrow dark">{{presentation.proofEyebrow}}</text><text class="section-title">{{presentation.proofTitle}}</text><text class="body">{{trustContent.bio}}</text><view class="stats"><view wx:for="{{trustContent.stats}}" wx:key="value"><text class="stat-value">{{item.value}}</text><text class="stat-label">{{item.label}}</text><text class="stat-sub">{{item.sub}}</text></view></view></view>
<view class="trust"><text class="eyebrow">{{presentation.manifestoEyebrow}}</text><text class="section-title light">{{presentation.manifestoTitle}}</text><view wx:for="{{trustContent.pillars}}" wx:key="title" class="pillar"><text class="pillar-title">{{item.title}}</text><text class="pillar-desc">{{item.desc}}</text></view></view>
<view class="intro"><text class="eyebrow dark">{{presentation.proofEyebrow}}</text><text class="section-title">{{presentation.proofTitle}}</text><text class="body">{{trustPresentation.bio}}</text><view class="stats"><view wx:for="{{trustPresentation.stats}}" wx:key="value"><text class="stat-value">{{item.value}}</text><text class="stat-label">{{item.label}}</text><text class="stat-sub">{{item.sub}}</text></view></view></view>
<view class="trust"><text class="eyebrow">{{presentation.manifestoEyebrow}}</text><text class="section-title light">{{presentation.manifestoTitle}}</text><view wx:for="{{trustPresentation.pillars}}" wx:key="title" class="pillar"><text class="pillar-title">{{item.title}}</text><text class="pillar-desc">{{item.desc}}</text></view></view>
<view class="section"><view class="section-head"><view><text class="eyebrow dark">{{presentation.worksEyebrow}}</text><text class="section-title">{{presentation.worksTitle}}</text></view><text class="more" bindtap="goWorks">{{presentation.worksAction}}</text></view><view wx:for="{{offerings}}" wx:key="id" class="work-card" data-id="{{item.id}}" bindtap="selectOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="work-info"><text class="work-category">{{item.category}} · {{item.area}}</text><text class="work-name">{{item.name}}</text><text class="work-desc">{{item.series}} · {{item.keywords[0]}} · {{item.keywords[1]}}</text></view></view></view>
<view class="flow"><text class="flow-eyebrow">{{presentation.flowEyebrow}}</text><text class="flow-title">{{presentation.flowTitle}}</text><view class="flow-grid"><view wx:for="{{trustContent.serviceFlow}}" wx:key="step" class="flow-item"><text class="flow-step">{{item.step}}</text><text class="flow-name">{{item.name}}</text><text class="flow-desc">{{item.desc}}</text></view></view></view>
<view class="flow"><text class="flow-eyebrow">{{presentation.flowEyebrow}}</text><text class="flow-title">{{presentation.flowTitle}}</text><view class="flow-grid"><view wx:for="{{trustPresentation.serviceFlow}}" wx:key="step" class="flow-item"><text class="flow-step">{{item.step}}</text><text class="flow-name">{{item.name}}</text><text class="flow-desc">{{item.desc}}</text></view></view></view>
</view>
@@ -1,6 +1,7 @@
Component({
properties: {
brand: { type: Object, value: {} },
trustItems: { type: Array, value: [] },
presentation: { type: Object, value: {} },
recordsCount: { type: Number, value: 0 },
},
@@ -23,4 +23,9 @@
<view class="card-title"><t-icon name="secured" size="32rpx" /><text>{{presentation.warrantyTitle}}</text></view>
<view wx:for="{{brand.profilePresentation.warranty}}" wx:key="*this" class="warranty"><text class="dot">•</text><text>{{item}}</text></view>
</view>
<view wx:for="{{trustItems}}" wx:key="title" class="info-card trust-card">
<view class="card-title"><text>{{item.title}}</text></view>
<text wx:if="{{item.summary}}" class="trust-summary">{{item.summary}}</text>
<text>{{item.content}}</text>
</view>
</view>
@@ -189,6 +189,17 @@
font-size: 23rpx;
line-height: 1.65;
}
.trust-card > text {
display: block;
color: #57534e;
font-size: 23rpx;
line-height: 1.65;
}
.trust-card .trust-summary {
margin-bottom: 8rpx;
color: #202221;
font-weight: 600;
}
.dot {
flex: 0 0 auto;
color: #8a6846;
@@ -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>
@@ -82,6 +82,17 @@
"description": "访客自己的咨询记录"
}
],
"templateFields": [
{
"key": "designPhilosophy",
"page": "home",
"label": "设计理念",
"help": "用一两句话说明你的设计方法。",
"input": "textarea",
"maxLength": 160,
"placeholder": "例如:克制、自然、长期主义"
}
],
"assetSlots": [
{
"key": "brand.portrait",
@@ -120,6 +131,7 @@
"key": "identity",
"title": "主理人与联系方式",
"description": "让业主清楚谁负责项目,以及如何联系你。",
"page": "profile",
"target": "brand",
"fields": [
{
@@ -129,13 +141,6 @@
"input": "text",
"required": true
},
{
"key": "portrait",
"binding": "brand.config.avatarUrl",
"label": "主理人肖像",
"help": "建议使用正式、清晰的个人照片。",
"input": "image"
},
{
"key": "title",
"binding": "brand.config.title",
@@ -143,32 +148,6 @@
"input": "text",
"required": true,
"placeholder": "例如:别墅门系统主理人"
},
{
"key": "slogan",
"binding": "brand.config.slogan",
"label": "主理人主张",
"input": "textarea",
"maxLength": 100
},
{
"key": "studioAddress",
"binding": "brand.config.studioAddress",
"label": "服务区域或工作室地址",
"input": "text",
"required": true
},
{
"key": "phone",
"binding": "brand.config.phone",
"label": "公开联系电话",
"input": "phone"
},
{
"key": "wechat",
"binding": "brand.config.wechat",
"label": "公开微信号",
"input": "text"
}
]
},
@@ -176,6 +155,7 @@
"key": "home",
"title": "首页品牌表达",
"description": "用简洁的语言解释你的项目方法、代表作品和合作流程。",
"page": "home",
"target": "brand",
"fields": [
{
@@ -277,6 +257,7 @@
"key": "profileDetails",
"title": "服务区域与履约说明",
"description": "在主理人与我页面说明可服务的地区和真实履约承诺。",
"page": "profile",
"target": "brand",
"fields": [
{
@@ -363,6 +344,7 @@
"key": "cases",
"title": "案例与体系",
"description": "说明案例页展示的内容,让业主能快速找到相近项目。",
"page": "offerings",
"target": "offering",
"fields": [
{
@@ -402,6 +384,7 @@
"key": "consultation",
"title": "咨询说明",
"description": "明确访客提交后会得到怎样的回应,减少无效咨询。",
"page": "inquiry",
"target": "inquiry",
"fields": [
{
@@ -441,6 +424,7 @@
"key": "projectDetail",
"title": "案例详情",
"description": "以下内容分别填写在每个案例中,空白内容不会展示。",
"page": "detail",
"target": "offering",
"fields": [
{
@@ -517,6 +501,7 @@
"key": "detailCopy",
"title": "详情页说明",
"description": "说明案例内容、价格与咨询后的真实处理方式。",
"page": "detail",
"target": "brand",
"fields": [
{
@@ -574,6 +559,7 @@
"key": "successCopy",
"title": "提交成功页",
"description": "访客提交后看到的确认信息与后续预期。",
"page": "success",
"target": "brand",
"fields": [
{
@@ -613,6 +599,7 @@
"key": "recordsCopy",
"title": "咨询记录页",
"description": "访客查看咨询状态时看到的内容。",
"page": "records",
"target": "brand",
"fields": [
{
@@ -653,16 +640,22 @@
{
"type": "schedule",
"label": "服务与合作安排",
"adminFields": { "title": "安排标题", "summary": "安排摘要", "content": "时间与排期详情" },
"pages": ["profile"],
"help": "说明可预约时间、服务周期或项目排期。"
},
{
"type": "coverage",
"label": "服务范围与适用对象",
"adminFields": { "title": "范围标题", "summary": "范围摘要", "content": "服务范围说明" },
"pages": ["profile"],
"help": "说明服务地区、项目类型或合作边界。"
},
{
"type": "process",
"label": "合作流程",
"adminFields": { "title": "流程标题", "summary": "流程摘要", "content": "流程步骤" },
"pages": ["profile"],
"help": "每行写一步,从初次沟通到交付完成。",
"placeholder": "例如:需求沟通\n方案确认\n落地交付",
"required": true
@@ -670,6 +663,8 @@
{
"type": "credential",
"label": "专业资历与方法",
"adminFields": { "title": "证明标题", "summary": "专业摘要", "content": "资历与方法说明" },
"pages": ["home", "profile"],
"help": "填写经验、资质、专业标准或工作方法。",
"configFields": [
{
@@ -707,16 +702,29 @@
],
"required": true
},
{ "type": "case", "label": "项目案例与客户反馈", "help": "填写代表性项目、成果或客户评价。" },
{
"type": "case",
"label": "项目案例与客户反馈",
"adminFields": {
"title": "案例标题",
"summary": "案例摘要",
"content": "项目成果与客户反馈"
},
"pages": ["profile"],
"help": "填写代表性项目、成果或客户评价。"
},
{
"type": "promise",
"label": "合作预期与响应承诺",
"adminFields": { "title": "承诺标题", "summary": "承诺摘要", "content": "合作与响应说明" },
"pages": ["profile"],
"help": "说明回复时间、合作边界和后续跟进方式。"
}
],
"sampleContent": {
"doors": {
"templateKey": "doors",
"inquiryFormName": "门系统咨询表单",
"offerings": [
{
"kind": "product",
@@ -836,6 +844,7 @@
},
"personal": {
"templateKey": "personal",
"inquiryFormName": "合作咨询表单",
"offerings": [
{
"kind": "service",