feat: 在后台展示当前行业模板定义

This commit is contained in:
que01 committed 2026-09-19 21:27:11 +08:00
1 parent c6785892ed
commit 6ee0dffdb8
2 files changed
+19 -1

No files matched your search

+10
View File
@@ -101,6 +101,13 @@ export interface ApiErrorBody {
error: { code: string; message: string };
requestId: string | null;
}
export interface BrandTemplateDefinition {
key: "personal" | "food";
name: string;
description: string;
serviceCategories: string[];
trustContentTypes: string[];
}
export class ApiClientError extends Error {
constructor(
@@ -208,6 +215,9 @@ export class ApiClient {
updateAdminBrand(body: BrandUpdate): Promise<BrandProfile> {
return this.request("/admin/config/brand", { method: "PATCH", body });
}
getPublicTemplate(key: "personal" | "food"): Promise<BrandTemplateDefinition> {
return this.request(`/public/templates/${key}`);
}
updateAdminService(id: string, body: ServiceUpdate): Promise<PublicService> {
return this.request(`/admin/config/services/${encodeURIComponent(id)}`, {
method: "PATCH",