feat: 系统配置
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Has been cancelled

This commit is contained in:
luo
2026-07-25 14:13:49 +08:00
parent ee508c3e1e
commit dd6bceeeb7
20 changed files with 805 additions and 41 deletions

View File

@@ -0,0 +1,28 @@
import { BaseService } from '../BaseService'
import type { BaseResponse } from '@/types/api'
import type {
SystemConfigItem,
SystemConfigPageResult,
SystemConfigQueryParams,
UpdateSystemConfigRequest
} from '@/types/api/systemConfig'
const SYSTEM_CONFIG_BASE_URL = '/api/admin/system-configs'
export class SystemConfigService extends BaseService {
static getSystemConfigs(
params?: SystemConfigQueryParams
): Promise<BaseResponse<SystemConfigPageResult>> {
return this.get<BaseResponse<SystemConfigPageResult>>(SYSTEM_CONFIG_BASE_URL, params)
}
static updateSystemConfig(
key: string,
data: UpdateSystemConfigRequest
): Promise<BaseResponse<SystemConfigItem>> {
return this.put<BaseResponse<SystemConfigItem>>(
`${SYSTEM_CONFIG_BASE_URL}/${encodeURIComponent(key)}`,
data
)
}
}