feat: 完善模板字段编辑与分类治理

This commit is contained in:
que01 committed 2026-10-11 23:07:53 +08:00
1 parent 91322fa9a0
commit 26bcb2b66e
23 files changed
+631 -250

No files matched your search

@@ -0,0 +1,5 @@
-- Normalize offering category storage: categoryKey is authoritative.
-- Display labels are projected from the active template manifest.
UPDATE "Offering"
SET "config" = "config" - 'categoryLabel'
WHERE "config" IS NOT NULL;
-10
View File
@@ -128,7 +128,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
kind: "service",
config: {
categoryKey: "consulting",
categoryLabel: "策略咨询",
keywords: ["定位", "诊断", "表达"],
},
},
@@ -139,7 +138,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
kind: "subscription",
config: {
categoryKey: "advisory",
categoryLabel: "长期顾问",
keywords: ["陪跑", "内容", "转化"],
},
},
@@ -248,7 +246,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceAmount: 2800,
config: {
categoryKey: "set-meal",
categoryLabel: "套餐",
keywords: ["现做", "家常", "定制"],
},
},
@@ -260,7 +257,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceAmount: 3200,
config: {
categoryKey: "set-meal",
categoryLabel: "套餐",
keywords: ["现做", "家常", "定制"],
},
},
@@ -271,7 +267,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
kind: "service",
config: {
categoryKey: "private-chef",
categoryLabel: "私厨",
keywords: ["现做", "家常", "定制"],
},
},
@@ -410,7 +405,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceText: "¥38,000 - ¥85,000 / 樘",
config: {
categoryKey: "entrance-door",
categoryLabel: "入户大门",
series: "「万籁」重型天地轴入户系统",
tag: "主理人年度代表作",
area: "浙江·莫干山私家山庄",
@@ -446,7 +440,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceText: "¥42,000 - ¥98,000 / 樘",
config: {
categoryKey: "garden-door",
categoryLabel: "庭院围墙门",
series: "「虚实」透光私家庭院门",
tag: "建筑级耐候工艺",
area: "上海·佘山高尔夫别墅",
@@ -481,7 +474,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceText: "¥7,800 - ¥16,000 / 樘",
config: {
categoryKey: "interior-door",
categoryLabel: "室内户内门",
series: "「空灵」2.8m - 3.2m 满高通顶系统",
tag: "极简建筑平直感",
area: "江苏·苏州金鸡湖独栋",
@@ -516,7 +508,6 @@ const runtimeSeedTemplates: Record<"personal" | "food" | "doors", RuntimeSeedTem
priceText: "¥18,000 - ¥36,000 / 樘",
config: {
categoryKey: "stealth-door",
categoryLabel: "装饰隐形门",
series: "「无垠」密室及背景墙融合门",
tag: "精密收口工程",
area: "广东·深圳香蜜湖一号",
@@ -729,7 +720,6 @@ async function ensureRuntimeContent(brandId: string, template: RuntimeSeedTempla
coverUrl: image,
config: {
categoryKey: "custom",
categoryLabel: "自定义业务",
keywords: [],
media: [{ url: image, alt: item.name, type: "image" }],
sections: [],