Files
certd/packages/ui/certd-client/src/api/modules/api.basic.ts
T

58 lines
1.0 KiB
TypeScript
Raw Normal View History

import { request } from "../service";
2024-10-12 14:59:12 +08:00
export type SiteEnv = {
agent?: {
enabled?: boolean;
contactText?: string;
contactLink?: string;
};
};
export type SiteInfo = {
title: string;
slogan: string;
logo: string;
loginLogo: string;
icpNo: string;
licenseTo?: string;
licenseToUrl?: string;
};
export type PlusInfo = {
vipType?: string;
expireTime?: number;
isPlus: boolean;
isComm?: boolean;
};
export type SysPublicSetting = {
registerEnabled: boolean;
managerOtherUserPipeline: boolean;
icpNo?: string;
};
2024-08-25 01:55:34 +08:00
export type SysInstallInfo = {
siteId: string;
};
2024-10-12 14:59:12 +08:00
export type AllSettings = {
sysPublic: SysPublicSetting;
installInfo: SysInstallInfo;
plusInfo: PlusInfo;
siteInfo: SiteInfo;
siteEnv: SiteEnv;
};
2024-09-24 02:42:08 +08:00
2024-10-12 14:59:12 +08:00
export async function loadAllSettings(): Promise<AllSettings> {
2024-10-10 18:38:22 +08:00
return await request({
2024-10-12 14:59:12 +08:00
url: "/basic/settings/all",
2024-10-10 18:38:22 +08:00
method: "get"
});
}
2024-09-24 02:42:08 +08:00
2024-10-10 18:38:22 +08:00
export async function bindUrl(data: any): Promise<any> {
2024-09-24 02:42:08 +08:00
return await request({
url: "/sys/plus/bindUrl",
method: "post",
data
});
}