2024-06-16 00:20:02 +08:00
|
|
|
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;
|
|
|
|
|
};
|
2024-06-16 00:20:02 +08:00
|
|
|
export type SysPublicSetting = {
|
2024-08-05 12:49:44 +08:00
|
|
|
registerEnabled: boolean;
|
|
|
|
|
managerOtherUserPipeline: boolean;
|
2024-10-03 23:11:50 +08:00
|
|
|
icpNo?: string;
|
2024-08-05 12:49:44 +08:00
|
|
|
};
|
2024-06-16 00:20:02 +08:00
|
|
|
|
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
|
|
|
|
|
});
|
|
|
|
|
}
|