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

69 lines
1.2 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 = {
2024-10-12 16:49:49 +08:00
title?: string;
slogan?: string;
logo?: string;
loginLogo?: string;
icpNo?: string;
2024-10-12 14:59:12 +08:00
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-25 23:56:24 +08:00
export type MenuItem = {
id: string;
title: string;
icon?: string;
path?: string;
children?: MenuItem[];
};
export type HeaderMenus = {
menus: MenuItem[];
};
2024-08-25 01:55:34 +08:00
2024-10-12 14:59:12 +08:00
export type AllSettings = {
sysPublic: SysPublicSetting;
installInfo: SysInstallInfo;
plusInfo: PlusInfo;
siteInfo: SiteInfo;
siteEnv: SiteEnv;
2024-10-25 23:56:24 +08:00
headerMenus: HeaderMenus;
2024-10-12 14:59:12 +08:00
};
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
});
}