perf: 增加系统设置,可以关闭自助注册功能

This commit is contained in:
xiaojunnuo
2024-06-16 00:20:02 +08:00
parent 575bf2b73b
commit 20feacea12
19 changed files with 522 additions and 40 deletions
@@ -0,0 +1,38 @@
// @ts-ignore
import { request } from "/@/api/service";
const apiPrefix = "/sys/settings";
export const SettingKeys = {
SysPublic: "sys.public",
SysPrivate: "sys.private",
};
export async function SettingsGet(key: string) {
return await request({
url: apiPrefix + "/get",
method: "post",
params: {
key
}
});
}
export async function SettingsSave(key: string,setting: any) {
await request({
url: apiPrefix + "/save",
method: "post",
data: {
key,
setting: JSON.stringify(setting),
}
});
}
export async function PublicSettingsSave(setting: any) {
await request({
url: apiPrefix + "/savePublicSettings",
method: "post",
data: setting
});
}