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

+42 -1
View File
@@ -59,6 +59,40 @@ export type BrandPresentationUpdate = Partial<
Record<string, string>
>
>;
export interface TemplateAdminField {
key: string;
binding: string;
label: string;
help?: string;
input: "text" | "textarea" | "phone" | "image" | "number";
required?: boolean;
maxLength?: number;
placeholder?: string;
}
export interface TemplateAdminSection {
key: string;
title: string;
description: string;
target: "brand" | "offering" | "trust" | "inquiry";
fields: TemplateAdminField[];
}
export interface AdminTemplateContent {
displayName: string;
admin: { sections: TemplateAdminSection[] };
assetSlots: Array<{
key: string;
binding: string;
target: "brand" | "offering" | "trust";
label: string;
help: string;
required: boolean;
kind: "image" | "logo" | "portrait" | "texture";
aspectRatio?: string;
}>;
}
export interface OfferingUpdate {
name?: string;
description?: string;
@@ -630,6 +664,7 @@ export class ApiClient {
fields: BrandFieldDefinition[];
offerings: Offering[];
forms: unknown[];
templateContent: AdminTemplateContent | null;
}> {
return this.request("/admin/workspace");
}
@@ -638,7 +673,13 @@ export class ApiClient {
}
getAdminReleaseReadiness(): Promise<{
ready: boolean;
checks: Array<{ key: string; label: string; passed: boolean }>;
checks: Array<{
key: string;
label: string;
passed: boolean;
help?: string;
destination?: string;
}>;
}> {
return this.request("/admin/releases/readiness");
}