feat: 增加门窗行业模板声明与验收夹具

This commit is contained in:
que01 committed 2026-09-23 01:07:56 +08:00
1 parent 8b85cc0403
commit 041a6a7f02
7 files changed
+70 -9

No files matched your search

+2 -2
View File
@@ -104,7 +104,7 @@ export interface ApiErrorBody {
requestId: string | null;
}
export interface BrandTemplateDefinition {
key: "personal" | "food";
key: "personal" | "food" | "doors";
version: string;
name: string;
description: string;
@@ -471,7 +471,7 @@ export class ApiClient {
}> {
return this.request("/admin/workspace");
}
installAdminTemplate(templateKey: "personal" | "food"): Promise<unknown> {
installAdminTemplate(templateKey: "personal" | "food" | "doors"): Promise<unknown> {
return this.request("/admin/workspace/install", { method: "POST", body: { templateKey } });
}
listAdminCapabilities(): Promise<CapabilityInstallation[]> {
+43 -1
View File
@@ -1,6 +1,6 @@
export const configPackageName = "personal-brand-config";
export type BrandTemplateKey = "personal" | "food";
export type BrandTemplateKey = "personal" | "food" | "doors";
export type VisualTemplateKey = "linjing-editorial" | "minimal-neutral";
export type CapabilityKey = "offerings" | "inquiry" | "booking";
@@ -224,6 +224,48 @@ export const brandTemplates = {
],
capabilities: ["offerings", "inquiry", "booking"],
},
doors: {
key: "doors",
version: "1.0.0",
name: "高端门窗模板",
description: "适用于别墅门、院门、室内门与定制门窗服务的行业模板。",
serviceCategories: ["entrance-door", "garden-door", "interior-door", "custom"],
trustContentTypes: [
"profile",
"experience",
"credential",
"portfolio",
"process",
"testimonial",
],
modules: [
{ key: "identity", type: "identity", title: "品牌身份", required: true },
{ key: "trust", type: "trust", title: "工艺与信任", required: true },
{ key: "offerings", type: "offering", title: "门窗系列", required: true },
{ key: "inquiry", type: "inquiry", title: "设计咨询", required: true },
{ key: "contact", type: "contact", title: "品牌表达", required: true },
],
fields: [
{ scope: "profile", key: "name", label: "品牌名称", type: "text", required: true },
{ scope: "profile", key: "tagline", label: "一句话定位", type: "text", required: true },
{ scope: "profile", key: "audience", label: "服务对象", type: "textarea", required: true },
{
scope: "profile",
key: "valueProposition",
label: "提供的价值",
type: "textarea",
required: true,
},
{
scope: "profile",
key: "trustProof",
label: "信任证明入口",
type: "textarea",
required: true,
},
],
capabilities: ["offerings", "inquiry"],
},
} satisfies Record<BrandTemplateKey, BrandTemplateDefinition>;
export function isBrandTemplateKey(value: string): value is BrandTemplateKey {
+1 -1
View File
@@ -3,7 +3,7 @@ export type BookingRequestType = "package" | "private_chef" | "inquiry";
export type ContactPreference = "wechat" | "phone" | "none";
export type FulfillmentType = "pickup" | "delivery";
export type OrderStatus = BookingStatus;
export type BrandTemplateKey = "food" | "personal";
export type BrandTemplateKey = "food" | "personal" | "doors";
export const BRAND_TEMPLATE = { FOOD: "food", PERSONAL: "personal" } as const satisfies Record<
Uppercase<BrandTemplateKey>,
BrandTemplateKey