chore: 修复一些小问题

This commit is contained in:
xiaojunnuo
2025-04-13 00:45:01 +08:00
parent a5af3ba0cb
commit 18a32ffb0b
14 changed files with 62 additions and 48 deletions
@@ -1,21 +1,21 @@
// @ts-ignore
import { request } from "/@/api/service";
import { SysPrivateSetting, SysPublicSetting } from "/@/api/modules/api.basic";
import { SysPrivateSetting, SysPublicSetting } from "/@/store/settings/api.basic";
const apiPrefix = "/sys/settings";
export type SysSettings = { public: SysPublicSetting; private: SysPrivateSetting };
export const SettingKeys = {
SysPublic: "sys.public",
SysPrivate: "sys.private",
SysEmail: "sys.email"
SysEmail: "sys.email",
};
export async function SettingsGet(key: string) {
const res = await request({
url: apiPrefix + "/get",
method: "post",
params: {
key
}
key,
},
});
if (!res) {
return {};
@@ -29,8 +29,8 @@ export async function SettingsSave(key: string, setting: any) {
method: "post",
data: {
key,
setting: JSON.stringify(setting)
}
setting: JSON.stringify(setting),
},
});
}
@@ -38,14 +38,14 @@ export async function HeaderMenusSettingsSave(setting: any) {
return await request({
url: apiPrefix + "/headerMenus/save",
method: "post",
data: setting
data: setting,
});
}
export async function EmailSettingsGet() {
return await request({
url: apiPrefix + "/getEmailSettings",
method: "post"
method: "post",
});
}
@@ -53,21 +53,21 @@ export async function EmailSettingsSave(setting: any) {
return await request({
url: apiPrefix + "/saveEmailSettings",
method: "post",
data: setting
data: setting,
});
}
export async function stopOtherUserTimer() {
return await request({
url: apiPrefix + "/stopOtherUserTimer",
method: "post"
method: "post",
});
}
export async function SysSettingsGet(): Promise<SysSettings> {
return await request({
url: apiPrefix + "/getSysSettings",
method: "post"
method: "post",
});
}
@@ -75,14 +75,14 @@ export async function SysSettingsSave(data: SysSettings) {
return await request({
url: apiPrefix + "/saveSysSettings",
method: "post",
data: data
data: data,
});
}
export async function TestProxy() {
return await request({
url: apiPrefix + "/testProxy",
method: "post"
method: "post",
});
}
@@ -90,7 +90,7 @@ export async function TestSms(data: any) {
return await request({
url: apiPrefix + "/testSms",
method: "post",
data
data,
});
}
@@ -99,7 +99,7 @@ export async function GetSmsTypeDefine(type: string) {
url: apiPrefix + "/getSmsTypeDefine",
method: "post",
data: {
type
}
type,
},
});
}