fix: 补齐餐饮首页可编辑区域

This commit is contained in:
que01 committed 2026-10-09 17:53:47 +08:00
1 parent 66dbba5748
commit df2b1f6031
5 files changed
+79 -5

No files matched your search

@@ -0,0 +1,13 @@
template,page,visible_content,renderer_target,manifest_editor,source,status,evidence
acheng-campus-food,home,主理人身份、地点、出摊图片、餐品标题、首页操作按钮、承诺、业务卡片,food.home.identity; food.home.location; food.home.hero; food.home.offerings-heading; food.home.actions; food.home.promise-heading; acheng-campus-food.home.offering,对应 sections 已声明并补齐身份与操作目标,brand; offering; trust,已覆盖,契约测试 + 浏览器点选
acheng-campus-food,offerings,菜单说明、业务卡片,acheng-campus-food.offerings.menu; acheng-campus-food.offerings.item,对应 sections 已声明,brand; offering,已覆盖,契约测试 + 浏览器点选
acheng-campus-food,service,出摊说明、日程、配送、流程,acheng-campus-food.service.service; trust:schedule; trust:coverage; trust:process,对应 sections / trust declarations 已声明,brand; trust,待第二阶段复核,已存在浏览器点选路径
acheng-campus-food,profile,主理人与信任内容,acheng-campus-food.profile.identity; trust:credential; trust:case; trust:promise,对应 sections / trust declarations 已声明,brand; trust,待第二阶段复核,已存在 renderer target
acheng-campus-food,detail,餐品详情、详情说明,acheng-campus-food.detail.dishDetail; acheng-campus-food.detail.detailCopy,对应 sections 已声明,offering; brand,已覆盖,浏览器已验证底栏与编辑入口
acheng-campus-food,inquiry,页面文案、访客表单,acheng-campus-food.inquiry.booking,对应 section 已声明;Admin 已允许 inquiry section 编辑,brand; inquiry,首批已修复,浏览器已验证表单展示
acheng-campus-food,success,提交结果文案,acheng-campus-food.success.successCopy,对应 section 已声明,brand,待第二阶段复核,已验证页面可切换
acheng-campus-food,records,记录页文案,acheng-campus-food.records.recordsCopy,对应 section 已声明,brand; records,待第二阶段复核,已验证页面可切换
linjing-editorial,home,身份、主视觉、证明、主张、案例,editorial.home.identity; editorial.home.hero; editorial.home.proof; editorial.home.manifesto; editorial.home.works; linjing-editorial.home.home,对应 sections 已声明,brand; trust; offering,已覆盖,契约测试 + 浏览器点选
linjing-editorial,offerings,案例说明、业务卡片,linjing-editorial.offerings.cases; linjing-editorial.offerings.item,对应 sections 已声明,brand; offering,待第二阶段复核,已有 renderer target
linjing-editorial,profile,身份、履约、联系方式、信任内容,linjing-editorial.profile.identity; linjing-editorial.profile.profileDetails; trust:*,对应 sections / trust declarations 已声明,brand; trust,已覆盖,契约测试 + 浏览器点选
linjing-editorial,detail,案例详情、详情说明,linjing-editorial.detail.projectDetail; linjing-editorial.detail.detailCopy,对应 sections 已声明,offering; brand,待第二阶段复核,已有 renderer target
1 template page visible_content renderer_target manifest_editor source status evidence
2 acheng-campus-food home 主理人身份、地点、出摊图片、餐品标题、首页操作按钮、承诺、业务卡片 food.home.identity; food.home.location; food.home.hero; food.home.offerings-heading; food.home.actions; food.home.promise-heading; acheng-campus-food.home.offering 对应 sections 已声明并补齐身份与操作目标 brand; offering; trust 已覆盖 契约测试 + 浏览器点选
3 acheng-campus-food offerings 菜单说明、业务卡片 acheng-campus-food.offerings.menu; acheng-campus-food.offerings.item 对应 sections 已声明 brand; offering 已覆盖 契约测试 + 浏览器点选
4 acheng-campus-food service 出摊说明、日程、配送、流程 acheng-campus-food.service.service; trust:schedule; trust:coverage; trust:process 对应 sections / trust declarations 已声明 brand; trust 待第二阶段复核 已存在浏览器点选路径
5 acheng-campus-food profile 主理人与信任内容 acheng-campus-food.profile.identity; trust:credential; trust:case; trust:promise 对应 sections / trust declarations 已声明 brand; trust 待第二阶段复核 已存在 renderer target
6 acheng-campus-food detail 餐品详情、详情说明 acheng-campus-food.detail.dishDetail; acheng-campus-food.detail.detailCopy 对应 sections 已声明 offering; brand 已覆盖 浏览器已验证底栏与编辑入口
7 acheng-campus-food inquiry 页面文案、访客表单 acheng-campus-food.inquiry.booking 对应 section 已声明;Admin 已允许 inquiry section 编辑 brand; inquiry 首批已修复 浏览器已验证表单展示
8 acheng-campus-food success 提交结果文案 acheng-campus-food.success.successCopy 对应 section 已声明 brand 待第二阶段复核 已验证页面可切换
9 acheng-campus-food records 记录页文案 acheng-campus-food.records.recordsCopy 对应 section 已声明 brand; records 待第二阶段复核 已验证页面可切换
10 linjing-editorial home 身份、主视觉、证明、主张、案例 editorial.home.identity; editorial.home.hero; editorial.home.proof; editorial.home.manifesto; editorial.home.works; linjing-editorial.home.home 对应 sections 已声明 brand; trust; offering 已覆盖 契约测试 + 浏览器点选
11 linjing-editorial offerings 案例说明、业务卡片 linjing-editorial.offerings.cases; linjing-editorial.offerings.item 对应 sections 已声明 brand; offering 待第二阶段复核 已有 renderer target
12 linjing-editorial profile 身份、履约、联系方式、信任内容 linjing-editorial.profile.identity; linjing-editorial.profile.profileDetails; trust:* 对应 sections / trust declarations 已声明 brand; trust 已覆盖 契约测试 + 浏览器点选
13 linjing-editorial detail 案例详情、详情说明 linjing-editorial.detail.projectDetail; linjing-editorial.detail.detailCopy 对应 sections 已声明 offering; brand 待第二阶段复核 已有 renderer target
@@ -194,6 +194,7 @@ const templateContent = {
{ key: "food.home.identity", label: "主理人身份" },
{ key: "food.home.location", label: "服务地点" },
{ key: "food.home.offerings-heading", label: "餐品区域标题" },
{ key: "food.home.actions", label: "首页操作按钮" },
],
fields: [
{
@@ -224,6 +225,13 @@ const templateContent = {
label: "招牌餐品标题",
input: "text",
},
{
key: "primaryAction",
binding: "brand.config.visualPresentation.home.primaryAction",
previewTarget: "food.home.actions",
label: "咨询按钮",
input: "text",
},
],
},
],
@@ -353,6 +361,9 @@ test("Admin 按通用预览目标筛选字段并同步品牌草稿", async ({ pa
);
await expect(actionButtons.nth(0)).toContainText("咨询 / 预订");
await expect(actionButtons.nth(1)).toContainText("查看餐品");
await preview.locator('[data-editor-target="food.home.actions"]').click();
await expect(page.getByLabel("咨询按钮")).toBeVisible();
await page.keyboard.press("Escape");
await preview.locator('[data-editor-target="food.home.location"]').click();
await expect(page.getByText("出摊信息标题")).toBeVisible();
await expect(page.getByText("招牌餐品标题")).toHaveCount(0);
@@ -267,6 +267,10 @@ export const generatedTemplatePackageRegistry = [
"key": "food.home.offerings-heading",
"label": "餐品区域标题"
},
{
"key": "food.home.actions",
"label": "首页操作按钮"
},
{
"key": "food.home.promise-heading",
"label": "出餐承诺标题"
@@ -326,6 +330,27 @@ export const generatedTemplatePackageRegistry = [
"label": "招牌餐品标题",
"input": "text"
},
{
"key": "moreAction",
"previewTarget": "food.home.offerings-heading",
"binding": "brand.config.visualPresentation.home.moreAction",
"label": "查看全部按钮",
"input": "text"
},
{
"key": "primaryAction",
"previewTarget": "food.home.actions",
"binding": "brand.config.visualPresentation.home.primaryAction",
"label": "咨询按钮",
"input": "text"
},
{
"key": "secondaryAction",
"previewTarget": "food.home.actions",
"binding": "brand.config.visualPresentation.home.secondaryAction",
"label": "餐品按钮",
"input": "text"
},
{
"key": "manifestoTitle",
"previewTarget": "food.home.promise-heading",
@@ -2641,4 +2666,4 @@ export const generatedTemplatePackageRegistry = [
}
];
export const generatedTemplatePackageRegistryHash =
"4c99ea207a1a3689f19179ee3e56401585b838c2eeda237487943ca856dbbe52";
"a0e75797819fae48ed9592704c7ab271725298617aca56fa9e674c132684dde2";
@@ -29,12 +29,12 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
<Text>{text(brand.address)}</Text>
{p.stallTime && <Text className="notice-time">{p.stallTime}</Text>}
</View>
<View className="actions">
<View className="actions" data-editor-target="food.home.actions">
<Button className="home-action" onClick={() => navigate("inquiry")}>
咨询 / 预订
{p.primaryAction || "咨询 / 预订"}
</Button>
<Button className="home-action muted" onClick={() => navigate("offerings")}>
查看餐品
{p.secondaryAction || "查看餐品"}
</Button>
</View>
</View>
@@ -57,7 +57,7 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
<Text className="heading">{p.worksTitle || "可选餐品"}</Text>
</View>
<Text className="more" onClick={() => navigate("offerings")}>
查看全部 ›
{p.moreAction || "查看全部"} ›
</Text>
</View>
<View className="dish-grid">
@@ -260,6 +260,10 @@
"key": "food.home.offerings-heading",
"label": "餐品区域标题"
},
{
"key": "food.home.actions",
"label": "首页操作按钮"
},
{
"key": "food.home.promise-heading",
"label": "出餐承诺标题"
@@ -319,6 +323,27 @@
"label": "招牌餐品标题",
"input": "text"
},
{
"key": "moreAction",
"previewTarget": "food.home.offerings-heading",
"binding": "brand.config.visualPresentation.home.moreAction",
"label": "查看全部按钮",
"input": "text"
},
{
"key": "primaryAction",
"previewTarget": "food.home.actions",
"binding": "brand.config.visualPresentation.home.primaryAction",
"label": "咨询按钮",
"input": "text"
},
{
"key": "secondaryAction",
"previewTarget": "food.home.actions",
"binding": "brand.config.visualPresentation.home.secondaryAction",
"label": "餐品按钮",
"input": "text"
},
{
"key": "manifestoTitle",
"previewTarget": "food.home.promise-heading",