feat: 完善模板驱动的品牌内容工作台

This commit is contained in:
que01 committed 2026-09-25 05:21:42 +08:00
1 parent 77224ea51f
commit dd55af8d73
46 files changed
+2204 -295

No files matched your search

@@ -43,3 +43,28 @@ test("已发布 workspace 正常返回", async () => {
});
assert.equal(workspace.brand.name, "测试品牌");
});
test("模板声明的业务提供项展示字段会保留在小程序 view model", async () => {
const workspace = await loadWithResponse({
publication: { status: "published" },
brand: { name: "测试品牌" },
offerings: [
{
id: "offering-1",
name: "别墅入户门",
summary: "山庄项目",
coverUrl: "/cover.jpg",
priceText: "按项目报价",
presentation: {
categoryLabel: "入户大门",
series: "万籁系列",
area: "莫干山",
hardware: "隐藏式地轴",
},
},
],
});
assert.equal(workspace.offerings[0].series, "万籁系列");
assert.equal(workspace.offerings[0].area, "莫干山");
assert.equal(workspace.offerings[0].hardware, "隐藏式地轴");
});
+1
View File
@@ -8,6 +8,7 @@ function toOffering(item) {
presentation.details && typeof presentation.details === "object" ? presentation.details : {};
return {
...item,
...presentation,
id: item.id,
category: presentation.categoryLabel || "业务提供项",
name: item.name,