feat: 接入配置驱动的动态咨询表单
This commit is contained in:
1 parent
8872316ad3
commit
02966cf65c
9 files changed
+232
-3
No files matched your search
@@ -152,6 +152,13 @@ export interface InquiryForm {
|
||||
isEnabled: boolean;
|
||||
fieldsSnapshot: unknown[];
|
||||
}
|
||||
export interface PublicWorkspace {
|
||||
brand: BrandProfile | null;
|
||||
modules: BrandModule[];
|
||||
fields: BrandFieldDefinition[];
|
||||
offerings: Offering[];
|
||||
inquiryForm: InquiryForm | null;
|
||||
}
|
||||
export interface Offering {
|
||||
id: string;
|
||||
brandId?: string;
|
||||
@@ -220,6 +227,21 @@ export class ApiClient {
|
||||
listServices(): Promise<PublicService[]> {
|
||||
return this.request("/public/services");
|
||||
}
|
||||
getPublicWorkspace(): Promise<PublicWorkspace> {
|
||||
return this.request("/public/workspace");
|
||||
}
|
||||
getPublicInquiryForm(id: string): Promise<InquiryForm> {
|
||||
return this.request(`/public/inquiry-forms/${encodeURIComponent(id)}`);
|
||||
}
|
||||
createCustomerInquirySubmission(
|
||||
formId: string,
|
||||
values: Record<string, unknown>,
|
||||
): Promise<unknown> {
|
||||
return this.request("/customer/inquiry-submissions", {
|
||||
method: "POST",
|
||||
body: { formId, values },
|
||||
});
|
||||
}
|
||||
createCustomerSession(code: string): Promise<{ token: string }> {
|
||||
return this.request("/customer/session/wechat", { method: "POST", body: { code } });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user