fix: 完善模板可视化编辑闭环与通用验收
This commit is contained in:
1 parent
fa6b492bce
commit
22a82dbfba
39 files changed
+7773
-443
No files matched your search
@@ -136,6 +136,7 @@ export interface AdminTemplateContent {
|
||||
placeholder?: string;
|
||||
required?: boolean;
|
||||
configFields?: TemplateAdminField[];
|
||||
previewTargets?: Array<{ key: string; label: string; page?: string }>;
|
||||
maxPublishedItems?: number;
|
||||
hideStandardFields?: Array<"summary" | "content">;
|
||||
}>;
|
||||
|
||||
@@ -192,6 +192,30 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "记录数量单位",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_name",
|
||||
"binding": "brand.name",
|
||||
"label": "品牌名称",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -235,6 +259,14 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.home.offering",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -367,6 +399,38 @@ export const generatedTemplatePackageRegistry = [
|
||||
"binding": "brand.config.visualPresentation.home.manifestoTitle",
|
||||
"label": "出餐承诺标题",
|
||||
"input": "text"
|
||||
},
|
||||
{
|
||||
"key": "food_home_identity_avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "food.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_identity_description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "food.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_location_address",
|
||||
"binding": "brand.address",
|
||||
"label": "服务地址",
|
||||
"input": "text",
|
||||
"previewTarget": "food.home.location",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_hero_name",
|
||||
"binding": "brand.name",
|
||||
"label": "品牌名称",
|
||||
"input": "text",
|
||||
"previewTarget": "food.home.hero",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -380,16 +444,23 @@ export const generatedTemplatePackageRegistry = [
|
||||
{
|
||||
"key": "processAction",
|
||||
"binding": "brand.config.visualPresentation.service.processAction",
|
||||
"label": "流程咨询按钮",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"placeholder": "例如:立即预订",
|
||||
"previewTarget": "acheng-campus-food.service.service"
|
||||
"previewTarget": "food.service.process-action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.service.service",
|
||||
"label": "出摊服务页说明"
|
||||
"label": "出摊服务页说明",
|
||||
"composite": true,
|
||||
"children": [
|
||||
"food.service.process-action"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "food.service.process-action",
|
||||
"label": "咨询按钮文字"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -427,6 +498,21 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.offerings.item",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "餐品类别",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.offerings.item"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -677,21 +763,6 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "食材与搭配标题",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只写能够兑现的联系和确认方式。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -801,6 +872,58 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "咨询记录页"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "offerings_detailAction",
|
||||
"title": "详情按钮文字",
|
||||
"description": "此页同类按钮共用此文案。",
|
||||
"page": "offerings",
|
||||
"target": "brand",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.offerings.action",
|
||||
"label": "详情按钮文字"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "detailAction",
|
||||
"binding": "brand.config.visualPresentation.offerings.detailAction",
|
||||
"label": "详情按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.offerings.action"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "detailAction",
|
||||
"title": "详情页咨询入口",
|
||||
"description": "公共按钮与提示,对所有业务详情生效。",
|
||||
"page": "detail",
|
||||
"target": "brand",
|
||||
"fields": [
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.action"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只写能够兑现的联系和确认方式。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.detail.action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.detail.action",
|
||||
"label": "详情页咨询入口"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1493,7 +1616,7 @@ export const generatedTemplatePackageRegistry = [
|
||||
"key": "designPhilosophy",
|
||||
"page": "home",
|
||||
"binding": "brand.config.templateData.designPhilosophy",
|
||||
"previewTarget": "linjing-editorial.home.home",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"label": "设计理念",
|
||||
"help": "用一两句话说明你的设计方法。",
|
||||
"input": "textarea",
|
||||
@@ -1558,6 +1681,38 @@ export const generatedTemplatePackageRegistry = [
|
||||
"required": true,
|
||||
"placeholder": "例如:别墅门系统主理人",
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "contactPhone",
|
||||
"binding": "brand.contactPhone",
|
||||
"label": "联系电话",
|
||||
"input": "phone",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "contactWechat",
|
||||
"binding": "brand.contactWechat",
|
||||
"label": "联系微信",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "address",
|
||||
"binding": "brand.address",
|
||||
"label": "联系地址",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -1581,26 +1736,55 @@ export const generatedTemplatePackageRegistry = [
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "summary",
|
||||
"binding": "offering.summary",
|
||||
"label": "简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "priceText",
|
||||
"binding": "offering.priceText",
|
||||
"label": "价格说明",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "coverUrl",
|
||||
"binding": "offering.coverUrl",
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.home.offering",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "案例类别",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "area",
|
||||
"binding": "offering.config.area",
|
||||
"label": "项目地点",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "series",
|
||||
"binding": "offering.config.series",
|
||||
"label": "产品系列",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "keywords",
|
||||
"binding": "offering.config.keywords",
|
||||
"label": "项目关键词",
|
||||
"input": "list",
|
||||
"itemValueKey": "value",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "value",
|
||||
"label": "关键词"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -1619,7 +1803,7 @@ export const generatedTemplatePackageRegistry = [
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "editorial.home.identity",
|
||||
"label": "主理人标签"
|
||||
"label": "主理人介绍"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.hero",
|
||||
@@ -1639,7 +1823,21 @@ export const generatedTemplatePackageRegistry = [
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.home.home",
|
||||
"label": "首页品牌表达"
|
||||
"label": "首页品牌表达",
|
||||
"composite": true,
|
||||
"children": [
|
||||
"editorial.home.identity",
|
||||
"editorial.home.hero",
|
||||
"editorial.home.proof",
|
||||
"editorial.home.manifesto",
|
||||
"editorial.home.works",
|
||||
"editorial.home.flow",
|
||||
"linjing-editorial.home.offering"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.flow",
|
||||
"label": "合作流程标题"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
@@ -1707,49 +1905,105 @@ export const generatedTemplatePackageRegistry = [
|
||||
"binding": "brand.config.visualPresentation.home.worksAction",
|
||||
"label": "查看案例入口",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.works"
|
||||
},
|
||||
{
|
||||
"key": "flowEyebrow",
|
||||
"binding": "brand.config.visualPresentation.home.flowEyebrow",
|
||||
"label": "合作流程小标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.flow"
|
||||
},
|
||||
{
|
||||
"key": "flowTitle",
|
||||
"binding": "brand.config.visualPresentation.home.flowTitle",
|
||||
"label": "项目流程标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.flow"
|
||||
},
|
||||
{
|
||||
"key": "heroTitle",
|
||||
"binding": "brand.config.homeHero.title",
|
||||
"label": "首页主标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroEyebrow",
|
||||
"binding": "brand.config.homeHero.eyebrow",
|
||||
"label": "主图项目标注",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroDescription",
|
||||
"binding": "brand.config.homeHero.slogan",
|
||||
"label": "首页主图说明",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroAction",
|
||||
"binding": "brand.config.homeHero.cta",
|
||||
"label": "主图行动文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "founder",
|
||||
"binding": "brand.config.founder",
|
||||
"label": "主理人姓名",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "title",
|
||||
"binding": "brand.config.title",
|
||||
"label": "身份或职位",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_name",
|
||||
"binding": "brand.name",
|
||||
"label": "备用主标题(品牌名称)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_tagline",
|
||||
"binding": "brand.tagline",
|
||||
"label": "备用标注(品牌标语)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_description",
|
||||
"binding": "brand.description",
|
||||
"label": "备用说明(品牌简介)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1776,7 +2030,7 @@ export const generatedTemplatePackageRegistry = [
|
||||
"input": "textarea"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.coverage"
|
||||
},
|
||||
{
|
||||
"key": "warranty",
|
||||
@@ -1791,83 +2045,102 @@ export const generatedTemplatePackageRegistry = [
|
||||
"input": "textarea"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.warranty"
|
||||
},
|
||||
{
|
||||
"key": "recordsTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsTitle",
|
||||
"label": "咨询记录入口标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.records"
|
||||
},
|
||||
{
|
||||
"key": "recordsSubtitle",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsSubtitle",
|
||||
"label": "咨询记录入口说明",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.records"
|
||||
},
|
||||
{
|
||||
"key": "coverageTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.coverageTitle",
|
||||
"label": "服务区域标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.coverage"
|
||||
},
|
||||
{
|
||||
"key": "warrantyTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.warrantyTitle",
|
||||
"label": "履约说明标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.warranty"
|
||||
},
|
||||
{
|
||||
"key": "phoneLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.phoneLabel",
|
||||
"label": "电话标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "wechatLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.wechatLabel",
|
||||
"label": "微信标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "addressLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.addressLabel",
|
||||
"label": "地址标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "callAction",
|
||||
"binding": "brand.config.visualPresentation.profile.callAction",
|
||||
"label": "拨打电话按钮",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "copyAction",
|
||||
"binding": "brand.config.visualPresentation.profile.copyAction",
|
||||
"label": "复制微信按钮",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "recordsCountUnit",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsCountUnit",
|
||||
"label": "记录数量单位",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.profile.profileDetails",
|
||||
"label": "服务区域与履约说明"
|
||||
"label": "主理人页面",
|
||||
"composite": true,
|
||||
"children": [
|
||||
"linjing-editorial.profile.identity",
|
||||
"linjing-editorial.profile.records",
|
||||
"linjing-editorial.profile.coverage",
|
||||
"linjing-editorial.profile.warranty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.records",
|
||||
"label": "咨询记录入口"
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.coverage",
|
||||
"label": "服务区域"
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.warranty",
|
||||
"label": "履约说明"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1905,6 +2178,28 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.offerings.item",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "案例类别",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "area",
|
||||
"binding": "offering.config.area",
|
||||
"label": "项目地点",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -2173,21 +2468,6 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "材料说明标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只填写能兑现的服务安排。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -2297,6 +2577,58 @@ export const generatedTemplatePackageRegistry = [
|
||||
"label": "咨询记录页"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "offerings_detailAction",
|
||||
"title": "详情按钮文字",
|
||||
"description": "此页同类按钮共用此文案。",
|
||||
"page": "offerings",
|
||||
"target": "brand",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.offerings.action",
|
||||
"label": "详情按钮文字"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "detailAction",
|
||||
"binding": "brand.config.visualPresentation.offerings.detailAction",
|
||||
"label": "详情按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.action"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "detailAction",
|
||||
"title": "详情页咨询入口",
|
||||
"description": "公共按钮与提示,对所有业务详情生效。",
|
||||
"page": "detail",
|
||||
"target": "brand",
|
||||
"fields": [
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.action"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只填写能兑现的服务安排。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.detail.action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.detail.action",
|
||||
"label": "详情页咨询入口"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2355,12 +2687,30 @@ export const generatedTemplatePackageRegistry = [
|
||||
"profile"
|
||||
],
|
||||
"help": "填写经验、资质、专业标准或工作方法。",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "editorial.home.proof.stats",
|
||||
"label": "信任数据",
|
||||
"page": "home"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.manifesto.pillars",
|
||||
"label": "专业方法",
|
||||
"page": "home"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.flow.steps",
|
||||
"label": "合作流程步骤",
|
||||
"page": "home"
|
||||
}
|
||||
],
|
||||
"configFields": [
|
||||
{
|
||||
"key": "stats",
|
||||
"binding": "trust.config.stats",
|
||||
"label": "信任数据",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.proof.stats",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "value",
|
||||
@@ -2382,6 +2732,7 @@ export const generatedTemplatePackageRegistry = [
|
||||
"binding": "trust.config.pillars",
|
||||
"label": "专业方法",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.manifesto.pillars",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "title",
|
||||
@@ -2398,6 +2749,7 @@ export const generatedTemplatePackageRegistry = [
|
||||
"binding": "trust.config.serviceFlow",
|
||||
"label": "合作流程",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.flow.steps",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "step",
|
||||
@@ -2676,4 +3028,4 @@ export const generatedTemplatePackageRegistry = [
|
||||
}
|
||||
];
|
||||
export const generatedTemplatePackageRegistryHash =
|
||||
"d2dc4f44e161e567f9e726a777689e09b5e31cbc41aefe569a9531ccf6a604dd";
|
||||
"dbe686adc4c4efa5a7667c08671381fb28152c688baefcc70bf52655bed3012e";
|
||||
@@ -222,7 +222,11 @@ function Service({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
)}
|
||||
<Text>{text(process.config.refundNote)}</Text>
|
||||
</View>
|
||||
<Button className="process-action" onClick={() => navigate("inquiry")}>
|
||||
<Button
|
||||
data-editor-target="food.service.process-action"
|
||||
className="process-action"
|
||||
onClick={() => navigate("inquiry")}
|
||||
>
|
||||
{p.processAction || "立即咨询"} →
|
||||
</Button>
|
||||
</View>
|
||||
@@ -461,7 +465,9 @@ function OfferingList({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<Text className="subtitle">{item.desc}</Text>
|
||||
<View className="dish-bottom">
|
||||
<Text className="price">{item.priceRange}</Text>
|
||||
<Text className="more">{p.detailAction || "查看详情 ›"}</Text>
|
||||
<Text className="more" data-editor-target="acheng-campus-food.offerings.action">
|
||||
{p.detailAction || "查看详情 ›"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
@@ -560,7 +566,7 @@ function Detail({ workspace, id }: { workspace: RuntimeWorkspace; id?: string })
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
<View className="bar">
|
||||
<View className="bar" data-editor-target="acheng-campus-food.detail.action">
|
||||
<Button onClick={() => navigate("inquiry", { offeringId: item.id })}>
|
||||
{p.inquiryAction || "咨询 / 提前预订"}
|
||||
</Button>
|
||||
|
||||
@@ -185,6 +185,30 @@
|
||||
"label": "记录数量单位",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_name",
|
||||
"binding": "brand.name",
|
||||
"label": "品牌名称",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "acheng-campus-food_profile_identity_description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -228,6 +252,14 @@
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.home.offering",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -356,6 +388,38 @@
|
||||
"binding": "brand.config.visualPresentation.home.manifestoTitle",
|
||||
"label": "出餐承诺标题",
|
||||
"input": "text"
|
||||
},
|
||||
{
|
||||
"key": "food_home_identity_avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "food.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_identity_description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "food.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_location_address",
|
||||
"binding": "brand.address",
|
||||
"label": "服务地址",
|
||||
"input": "text",
|
||||
"previewTarget": "food.home.location",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "food_home_hero_name",
|
||||
"binding": "brand.name",
|
||||
"label": "品牌名称",
|
||||
"input": "text",
|
||||
"previewTarget": "food.home.hero",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -369,16 +433,21 @@
|
||||
{
|
||||
"key": "processAction",
|
||||
"binding": "brand.config.visualPresentation.service.processAction",
|
||||
"label": "流程咨询按钮",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"placeholder": "例如:立即预订",
|
||||
"previewTarget": "acheng-campus-food.service.service"
|
||||
"previewTarget": "food.service.process-action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.service.service",
|
||||
"label": "出摊服务页说明"
|
||||
"label": "出摊服务页说明",
|
||||
"composite": true,
|
||||
"children": ["food.service.process-action"]
|
||||
},
|
||||
{
|
||||
"key": "food.service.process-action",
|
||||
"label": "咨询按钮文字"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -416,6 +485,21 @@
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "acheng-campus-food.offerings.item",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "餐品类别",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.offerings.item"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -666,21 +750,6 @@
|
||||
"label": "食材与搭配标题",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只写能够兑现的联系和确认方式。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.detail.detailCopy"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -790,6 +859,58 @@
|
||||
"label": "咨询记录页"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "offerings_detailAction",
|
||||
"title": "详情按钮文字",
|
||||
"description": "此页同类按钮共用此文案。",
|
||||
"page": "offerings",
|
||||
"target": "brand",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.offerings.action",
|
||||
"label": "详情按钮文字"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "detailAction",
|
||||
"binding": "brand.config.visualPresentation.offerings.detailAction",
|
||||
"label": "详情按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.offerings.action"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "detailAction",
|
||||
"title": "详情页咨询入口",
|
||||
"description": "公共按钮与提示,对所有业务详情生效。",
|
||||
"page": "detail",
|
||||
"target": "brand",
|
||||
"fields": [
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "acheng-campus-food.detail.action"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只写能够兑现的联系和确认方式。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "acheng-campus-food.detail.action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "acheng-campus-food.detail.action",
|
||||
"label": "详情页咨询入口"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -116,6 +116,7 @@ export type TemplateTrustContentType = {
|
||||
placeholder?: string;
|
||||
required?: boolean;
|
||||
configFields?: TemplateAdminField[];
|
||||
previewTargets?: Array<{ key: string; label: string; page?: string }>;
|
||||
maxPublishedItems?: number;
|
||||
hideStandardFields?: Array<"summary" | "content">;
|
||||
};
|
||||
|
||||
@@ -169,7 +169,12 @@ test("shared brand facts have one editor and template-specific offering detail b
|
||||
const bindings = manifest.admin.sections.flatMap((section) =>
|
||||
section.fields.map((field) => field.binding),
|
||||
);
|
||||
assert.ok(!bindings.some((binding) => sharedBrandBindings.has(binding)), key);
|
||||
for (const field of manifest.admin.sections.flatMap((section) => section.fields)) {
|
||||
if (sharedBrandBindings.has(field.binding)) {
|
||||
assert.ok(field.previewTarget, key + ": shared facts need visual targets");
|
||||
assert.ok(!field.binding.includes(".config."), "Shared facts must use canonical columns");
|
||||
}
|
||||
}
|
||||
}
|
||||
const foodRoot = path.join(packageRoot, "template-acheng-campus-food");
|
||||
const food = JSON.parse(fs.readFileSync(path.join(foodRoot, "template.json"), "utf8"));
|
||||
|
||||
@@ -24,6 +24,13 @@ for (const directory of templateDirectories) {
|
||||
const targets = sections.flatMap((section) =>
|
||||
(section.previewTargets ?? []).map((target) => ({ ...target, page: section.page, section })),
|
||||
);
|
||||
for (const declaration of manifest.trustContentTypes ?? [])
|
||||
for (const target of declaration.previewTargets ?? [])
|
||||
targets.push({
|
||||
...target,
|
||||
page: declaration.pages?.[0] ?? "home",
|
||||
section: { fields: declaration.configFields ?? [] },
|
||||
});
|
||||
const keys = targets.map((target) => target.key);
|
||||
assert.equal(new Set(keys).size, keys.length, "preview target keys must be unique");
|
||||
|
||||
@@ -32,7 +39,7 @@ for (const directory of templateDirectories) {
|
||||
assert.ok(field.binding, `${section.key}.${field.key} must have an editable binding`);
|
||||
assert.ok(field.previewTarget, `${section.key}.${field.key} must map to a visual region`);
|
||||
assert.ok(
|
||||
section.previewTargets?.some((target) => target.key === field.previewTarget),
|
||||
targets.some((target) => target.key === field.previewTarget),
|
||||
`${section.key}.${field.key} references an undeclared previewTarget`,
|
||||
);
|
||||
}
|
||||
@@ -44,9 +51,11 @@ for (const directory of templateDirectories) {
|
||||
);
|
||||
for (const child of target.children)
|
||||
assert.ok(
|
||||
section.previewTargets?.some(
|
||||
(candidate) => candidate.key === child && !candidate.composite,
|
||||
),
|
||||
targets.some((candidate) => candidate.key === child && !candidate.composite) ||
|
||||
(child.startsWith("trust:") &&
|
||||
(manifest.trustContentTypes ?? []).some(
|
||||
(declaration) => `trust:${declaration.type}` === child,
|
||||
)),
|
||||
`${target.key} references missing or composite child ${child}`,
|
||||
);
|
||||
assert.ok(
|
||||
@@ -69,7 +78,10 @@ for (const directory of templateDirectories) {
|
||||
for (const target of targets)
|
||||
if (!target.composite)
|
||||
assert.ok(
|
||||
target.section.fields.some((field) => field.previewTarget === target.key),
|
||||
target.section.fields.some((field) => field.previewTarget === target.key) ||
|
||||
(manifest.trustContentTypes ?? []).some((declaration) =>
|
||||
(declaration.configFields ?? []).some((field) => field.previewTarget === target.key),
|
||||
),
|
||||
`${target.key} must map to at least one editable field`,
|
||||
);
|
||||
|
||||
|
||||
@@ -60,7 +60,11 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
>
|
||||
{credential?.content}
|
||||
</Text>
|
||||
<View className="stats">
|
||||
<View
|
||||
className="stats"
|
||||
data-editor-target="editorial.home.proof.stats"
|
||||
data-editor-record-id={credential?.id}
|
||||
>
|
||||
{t.stats?.map((item, index) => (
|
||||
<View key={index}>
|
||||
<Text className="stat-value">{item.value}</Text>
|
||||
@@ -73,12 +77,18 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View className="trust" data-editor-target="editorial.home.manifesto">
|
||||
<Text className="eyebrow">{p.manifestoEyebrow}</Text>
|
||||
<Text className="section-title light">{p.manifestoTitle}</Text>
|
||||
{t.pillars?.map((item, index) => (
|
||||
<View className="pillar" key={index}>
|
||||
<Text className="pillar-title">{item.title}</Text>
|
||||
<Text className="pillar-desc">{item.desc}</Text>
|
||||
</View>
|
||||
))}
|
||||
<View
|
||||
className="pillars-content"
|
||||
data-editor-target="editorial.home.manifesto.pillars"
|
||||
data-editor-record-id={credential?.id}
|
||||
>
|
||||
{t.pillars?.map((item, index) => (
|
||||
<View className="pillar" key={index}>
|
||||
<Text className="pillar-title">{item.title}</Text>
|
||||
<Text className="pillar-desc">{item.desc}</Text>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
<View className="section">
|
||||
<View className="section-head" data-editor-target="editorial.home.works">
|
||||
@@ -111,10 +121,14 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
<View className="flow">
|
||||
<View className="flow" data-editor-target="editorial.home.flow">
|
||||
<Text className="flow-eyebrow">{p.flowEyebrow}</Text>
|
||||
<Text className="flow-title">{p.flowTitle}</Text>
|
||||
<View className="flow-grid">
|
||||
<View
|
||||
className="flow-grid"
|
||||
data-editor-target="editorial.home.flow.steps"
|
||||
data-editor-record-id={credential?.id}
|
||||
>
|
||||
{t.serviceFlow?.map((step, index) => (
|
||||
<View className="flow-item" key={index}>
|
||||
<Text className="flow-step">{step.step}</Text>
|
||||
@@ -183,7 +197,11 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
<View className="records-card" onClick={() => navigate("records")}>
|
||||
<View
|
||||
className="records-card"
|
||||
data-editor-target="linjing-editorial.profile.records"
|
||||
onClick={() => navigate("records")}
|
||||
>
|
||||
<View className="entry-copy">
|
||||
<Text>{p.recordsTitle || "我的咨询记录"}</Text>
|
||||
<Text>{p.recordsSubtitle}</Text>
|
||||
@@ -191,7 +209,7 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<Text>查看 ›</Text>
|
||||
</View>
|
||||
{rows(config.coverage).length > 0 && (
|
||||
<View className="info-card">
|
||||
<View className="info-card" data-editor-target="linjing-editorial.profile.coverage">
|
||||
<View className="card-title">{p.coverageTitle}</View>
|
||||
{rows(config.coverage).map((item, index) => (
|
||||
<View className="note" key={index}>
|
||||
@@ -202,7 +220,7 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
</View>
|
||||
)}
|
||||
{Array.isArray(config.warranty) && config.warranty.length > 0 && (
|
||||
<View className="info-card">
|
||||
<View className="info-card" data-editor-target="linjing-editorial.profile.warranty">
|
||||
<View className="card-title">{p.warrantyTitle}</View>
|
||||
{config.warranty.map((item, index) => (
|
||||
<View className="warranty" key={index}>
|
||||
@@ -233,8 +251,8 @@ function List({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
return (
|
||||
<View className="editorial-list" data-editor-target="linjing-editorial.offerings.cases">
|
||||
<View className="page">
|
||||
<Text className="eyebrow">{p.eyebrow}</Text>
|
||||
<Text className="section-title">{p.title || "作品与服务"}</Text>
|
||||
<Text className="eyebrow">{p.worksEyebrow}</Text>
|
||||
<Text className="section-title">{p.worksTitle || "作品与服务"}</Text>
|
||||
<Text className="subtitle">{p.subtitle}</Text>
|
||||
{workspace.offerings.map(offering).map((item) => (
|
||||
<View
|
||||
@@ -252,7 +270,9 @@ function List({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<Text className="work-name">{item.name}</Text>
|
||||
<Text className="work-desc">{item.desc}</Text>
|
||||
<Text className="work-price">{item.priceRange}</Text>
|
||||
<Text className="more">{p.detailAction || "了解详情 →"}</Text>
|
||||
<Text className="more" data-editor-target="linjing-editorial.offerings.action">
|
||||
{p.detailAction || "了解详情 →"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
@@ -345,7 +365,7 @@ function Detail({ workspace, id }: { workspace: RuntimeWorkspace; id?: string })
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
<View className="bar">
|
||||
<View className="bar" data-editor-target="linjing-editorial.detail.action">
|
||||
<Button onClick={() => navigate("inquiry", { offeringId: item.id })}>
|
||||
{p.inquiryAction}
|
||||
</Button>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
"key": "designPhilosophy",
|
||||
"page": "home",
|
||||
"binding": "brand.config.templateData.designPhilosophy",
|
||||
"previewTarget": "linjing-editorial.home.home",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"label": "设计理念",
|
||||
"help": "用一两句话说明你的设计方法。",
|
||||
"input": "textarea",
|
||||
@@ -152,6 +152,38 @@
|
||||
"required": true,
|
||||
"placeholder": "例如:别墅门系统主理人",
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "contactPhone",
|
||||
"binding": "brand.contactPhone",
|
||||
"label": "联系电话",
|
||||
"input": "phone",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "contactWechat",
|
||||
"binding": "brand.contactWechat",
|
||||
"label": "联系微信",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "address",
|
||||
"binding": "brand.address",
|
||||
"label": "联系地址",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -175,26 +207,55 @@
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "summary",
|
||||
"binding": "offering.summary",
|
||||
"label": "简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "priceText",
|
||||
"binding": "offering.priceText",
|
||||
"label": "价格说明",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "coverUrl",
|
||||
"binding": "offering.coverUrl",
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.home.offering",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "案例类别",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "area",
|
||||
"binding": "offering.config.area",
|
||||
"label": "项目地点",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "series",
|
||||
"binding": "offering.config.series",
|
||||
"label": "产品系列",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
},
|
||||
{
|
||||
"key": "keywords",
|
||||
"binding": "offering.config.keywords",
|
||||
"label": "项目关键词",
|
||||
"input": "list",
|
||||
"itemValueKey": "value",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "value",
|
||||
"label": "关键词"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.home.offering"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -213,7 +274,7 @@
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "editorial.home.identity",
|
||||
"label": "主理人标签"
|
||||
"label": "主理人介绍"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.hero",
|
||||
@@ -233,7 +294,21 @@
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.home.home",
|
||||
"label": "首页品牌表达"
|
||||
"label": "首页品牌表达",
|
||||
"composite": true,
|
||||
"children": [
|
||||
"editorial.home.identity",
|
||||
"editorial.home.hero",
|
||||
"editorial.home.proof",
|
||||
"editorial.home.manifesto",
|
||||
"editorial.home.works",
|
||||
"editorial.home.flow",
|
||||
"linjing-editorial.home.offering"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.flow",
|
||||
"label": "合作流程标题"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
@@ -301,49 +376,105 @@
|
||||
"binding": "brand.config.visualPresentation.home.worksAction",
|
||||
"label": "查看案例入口",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.works"
|
||||
},
|
||||
{
|
||||
"key": "flowEyebrow",
|
||||
"binding": "brand.config.visualPresentation.home.flowEyebrow",
|
||||
"label": "合作流程小标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.flow"
|
||||
},
|
||||
{
|
||||
"key": "flowTitle",
|
||||
"binding": "brand.config.visualPresentation.home.flowTitle",
|
||||
"label": "项目流程标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.flow"
|
||||
},
|
||||
{
|
||||
"key": "heroTitle",
|
||||
"binding": "brand.config.homeHero.title",
|
||||
"label": "首页主标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroEyebrow",
|
||||
"binding": "brand.config.homeHero.eyebrow",
|
||||
"label": "主图项目标注",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroDescription",
|
||||
"binding": "brand.config.homeHero.slogan",
|
||||
"label": "首页主图说明",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "heroAction",
|
||||
"binding": "brand.config.homeHero.cta",
|
||||
"label": "主图行动文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.home.home"
|
||||
"previewTarget": "editorial.home.hero"
|
||||
},
|
||||
{
|
||||
"key": "avatarUrl",
|
||||
"binding": "brand.avatarUrl",
|
||||
"label": "主理人头像",
|
||||
"input": "image",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "founder",
|
||||
"binding": "brand.config.founder",
|
||||
"label": "主理人姓名",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "title",
|
||||
"binding": "brand.config.title",
|
||||
"label": "身份或职位",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"binding": "brand.description",
|
||||
"label": "主理人简介",
|
||||
"input": "textarea",
|
||||
"previewTarget": "editorial.home.identity",
|
||||
"help": "共享品牌资料,修改后同步影响其他展示位置。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_name",
|
||||
"binding": "brand.name",
|
||||
"label": "备用主标题(品牌名称)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_tagline",
|
||||
"binding": "brand.tagline",
|
||||
"label": "备用标注(品牌标语)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
},
|
||||
{
|
||||
"key": "heroFallback_description",
|
||||
"binding": "brand.description",
|
||||
"label": "备用说明(品牌简介)",
|
||||
"input": "text",
|
||||
"previewTarget": "editorial.home.hero",
|
||||
"help": "共享品牌值;对应主图文案为空时使用。"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -370,7 +501,7 @@
|
||||
"input": "textarea"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.coverage"
|
||||
},
|
||||
{
|
||||
"key": "warranty",
|
||||
@@ -385,83 +516,102 @@
|
||||
"input": "textarea"
|
||||
}
|
||||
],
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.warranty"
|
||||
},
|
||||
{
|
||||
"key": "recordsTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsTitle",
|
||||
"label": "咨询记录入口标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.records"
|
||||
},
|
||||
{
|
||||
"key": "recordsSubtitle",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsSubtitle",
|
||||
"label": "咨询记录入口说明",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.records"
|
||||
},
|
||||
{
|
||||
"key": "coverageTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.coverageTitle",
|
||||
"label": "服务区域标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.coverage"
|
||||
},
|
||||
{
|
||||
"key": "warrantyTitle",
|
||||
"binding": "brand.config.visualPresentation.profile.warrantyTitle",
|
||||
"label": "履约说明标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.warranty"
|
||||
},
|
||||
{
|
||||
"key": "phoneLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.phoneLabel",
|
||||
"label": "电话标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "wechatLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.wechatLabel",
|
||||
"label": "微信标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "addressLabel",
|
||||
"binding": "brand.config.visualPresentation.profile.addressLabel",
|
||||
"label": "地址标签",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "callAction",
|
||||
"binding": "brand.config.visualPresentation.profile.callAction",
|
||||
"label": "拨打电话按钮",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "copyAction",
|
||||
"binding": "brand.config.visualPresentation.profile.copyAction",
|
||||
"label": "复制微信按钮",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
},
|
||||
{
|
||||
"key": "recordsCountUnit",
|
||||
"binding": "brand.config.visualPresentation.profile.recordsCountUnit",
|
||||
"label": "记录数量单位",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.profile.profileDetails"
|
||||
"previewTarget": "linjing-editorial.profile.identity"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.profile.profileDetails",
|
||||
"label": "服务区域与履约说明"
|
||||
"label": "主理人页面",
|
||||
"composite": true,
|
||||
"children": [
|
||||
"linjing-editorial.profile.identity",
|
||||
"linjing-editorial.profile.records",
|
||||
"linjing-editorial.profile.coverage",
|
||||
"linjing-editorial.profile.warranty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.records",
|
||||
"label": "咨询记录入口"
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.coverage",
|
||||
"label": "服务区域"
|
||||
},
|
||||
{
|
||||
"key": "linjing-editorial.profile.warranty",
|
||||
"label": "履约说明"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -499,6 +649,28 @@
|
||||
"label": "封面图片",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "detailHero",
|
||||
"binding": "offering.config.detailHero",
|
||||
"label": "详情主图",
|
||||
"input": "image",
|
||||
"previewTarget": "linjing-editorial.offerings.item",
|
||||
"help": "此图优先用于卡片和详情;未填写时使用封面图片。"
|
||||
},
|
||||
{
|
||||
"key": "categoryLabel",
|
||||
"binding": "offering.config.categoryLabel",
|
||||
"label": "案例类别",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
},
|
||||
{
|
||||
"key": "area",
|
||||
"binding": "offering.config.area",
|
||||
"label": "项目地点",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.item"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -767,21 +939,6 @@
|
||||
"label": "材料说明标题",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只填写能兑现的服务安排。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.detail.detailCopy"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
@@ -891,6 +1048,58 @@
|
||||
"label": "咨询记录页"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "offerings_detailAction",
|
||||
"title": "详情按钮文字",
|
||||
"description": "此页同类按钮共用此文案。",
|
||||
"page": "offerings",
|
||||
"target": "brand",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.offerings.action",
|
||||
"label": "详情按钮文字"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "detailAction",
|
||||
"binding": "brand.config.visualPresentation.offerings.detailAction",
|
||||
"label": "详情按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.offerings.action"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "detailAction",
|
||||
"title": "详情页咨询入口",
|
||||
"description": "公共按钮与提示,对所有业务详情生效。",
|
||||
"page": "detail",
|
||||
"target": "brand",
|
||||
"fields": [
|
||||
{
|
||||
"key": "inquiryAction",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryAction",
|
||||
"label": "咨询按钮文字",
|
||||
"input": "text",
|
||||
"previewTarget": "linjing-editorial.detail.action"
|
||||
},
|
||||
{
|
||||
"key": "inquiryHint",
|
||||
"binding": "brand.config.visualPresentation.detail.inquiryHint",
|
||||
"label": "咨询后的处理说明",
|
||||
"help": "只填写能兑现的服务安排。",
|
||||
"input": "textarea",
|
||||
"previewTarget": "linjing-editorial.detail.action"
|
||||
}
|
||||
],
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "linjing-editorial.detail.action",
|
||||
"label": "详情页咨询入口"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -940,12 +1149,30 @@
|
||||
},
|
||||
"pages": ["home", "profile"],
|
||||
"help": "填写经验、资质、专业标准或工作方法。",
|
||||
"previewTargets": [
|
||||
{
|
||||
"key": "editorial.home.proof.stats",
|
||||
"label": "信任数据",
|
||||
"page": "home"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.manifesto.pillars",
|
||||
"label": "专业方法",
|
||||
"page": "home"
|
||||
},
|
||||
{
|
||||
"key": "editorial.home.flow.steps",
|
||||
"label": "合作流程步骤",
|
||||
"page": "home"
|
||||
}
|
||||
],
|
||||
"configFields": [
|
||||
{
|
||||
"key": "stats",
|
||||
"binding": "trust.config.stats",
|
||||
"label": "信任数据",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.proof.stats",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "value",
|
||||
@@ -967,6 +1194,7 @@
|
||||
"binding": "trust.config.pillars",
|
||||
"label": "专业方法",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.manifesto.pillars",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "title",
|
||||
@@ -983,6 +1211,7 @@
|
||||
"binding": "trust.config.serviceFlow",
|
||||
"label": "合作流程",
|
||||
"input": "list",
|
||||
"previewTarget": "editorial.home.flow.steps",
|
||||
"itemFields": [
|
||||
{
|
||||
"key": "step",
|
||||
|
||||
@@ -106,11 +106,31 @@ export function projectBrandAliases(
|
||||
return {
|
||||
...brand,
|
||||
...config,
|
||||
// 标准品牌事实不能被旧模板 config 中同名残留覆盖。
|
||||
...Object.fromEntries(
|
||||
[
|
||||
"id",
|
||||
"slug",
|
||||
"name",
|
||||
"templateKey",
|
||||
"tagline",
|
||||
"description",
|
||||
"avatarUrl",
|
||||
"coverUrl",
|
||||
"hours",
|
||||
"address",
|
||||
"deliveryNote",
|
||||
"contactPhone",
|
||||
"contactWechat",
|
||||
]
|
||||
.filter((key) => Object.prototype.hasOwnProperty.call(brand, key))
|
||||
.map((key) => [key, brand[key]]),
|
||||
),
|
||||
...(typeof brand.tagline === "string" ? { tagline: brand.tagline } : {}),
|
||||
...(typeof brand.description === "string" ? { slogan: brand.description } : {}),
|
||||
...(typeof brand.contactPhone === "string" ? { phone: brand.contactPhone } : {}),
|
||||
...(typeof brand.contactWechat === "string" ? { wechat: brand.contactWechat } : {}),
|
||||
...(typeof brand.address === "string" ? { studioAddress: brand.address } : {}),
|
||||
...(Object.hasOwn(brand, "description") ? { slogan: brand.description ?? "" } : {}),
|
||||
...(Object.hasOwn(brand, "contactPhone") ? { phone: brand.contactPhone ?? "" } : {}),
|
||||
...(Object.hasOwn(brand, "contactWechat") ? { wechat: brand.contactWechat ?? "" } : {}),
|
||||
...(Object.hasOwn(brand, "address") ? { studioAddress: brand.address ?? "" } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ export interface CapabilityPluginManifest {
|
||||
export interface RuntimeWorkspace {
|
||||
schemaVersion: string;
|
||||
publication?: {
|
||||
status: "published" | "unpublished";
|
||||
status: "published" | "unpublished" | "draft";
|
||||
version: number | null;
|
||||
publishedAt?: string;
|
||||
};
|
||||
|
||||
@@ -112,3 +112,34 @@ test("legacy profile configuration cannot shadow the declared credential editor"
|
||||
);
|
||||
assert.deepEqual(result, { stats });
|
||||
});
|
||||
|
||||
test("标准品牌列和清空值不会被旧 config 同名字段覆盖", () => {
|
||||
const result = projectBrandAliases(
|
||||
{
|
||||
name: "标准名称",
|
||||
avatarUrl: "标准头像",
|
||||
contactPhone: "新电话",
|
||||
description: "新简介",
|
||||
address: null,
|
||||
},
|
||||
{
|
||||
name: "旧名称",
|
||||
avatarUrl: "旧头像",
|
||||
contactPhone: "旧电话",
|
||||
description: "旧简介",
|
||||
address: "旧地址",
|
||||
},
|
||||
);
|
||||
assert.equal(result.name, "标准名称");
|
||||
assert.equal(result.avatarUrl, "标准头像");
|
||||
assert.equal(result.contactPhone, "新电话");
|
||||
assert.equal(result.description, "新简介");
|
||||
assert.equal(result.address, null);
|
||||
assert.equal(result.studioAddress, "");
|
||||
const cleared = projectBrandAliases(
|
||||
{ contactPhone: null, description: null },
|
||||
{ phone: "旧电话", slogan: "旧简介" },
|
||||
);
|
||||
assert.equal(cleared.phone, "");
|
||||
assert.equal(cleared.slogan, "");
|
||||
});
|
||||
Reference in new issue
Block a user