by-crm/frontend/src/api/system.ts
andy ea8f8390da chore: 从 git 中移除 backend/target 目录
- 使用 git rm --cached 从版本控制中删除 target 目录
- .gitignore 已配置忽略 target 和 node_modules
- 本地文件保留,仅从 git 索引中删除

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 16:12:04 +08:00

45 lines
841 B
TypeScript

import request from '@/utils/request'
import type { SystemConfig } from '@/types'
/**
* 获取所有系统配置(管理员)
*/
export function getAllConfigs() {
return request<SystemConfig[]>({
url: '/system/config',
method: 'get'
})
}
/**
* 获取指定配置值
*/
export function getConfigValue(configKey: string) {
return request<string>({
url: `/system/config/value/${configKey}`,
method: 'get'
})
}
/**
* 更新配置
*/
export function updateConfig(configKey: string, configValue: string) {
return request({
url: '/system/config',
method: 'put',
data: { configKey, configValue }
})
}
/**
* 批量更新配置
*/
export function batchUpdateConfigs(configs: Record<string, string>) {
return request({
url: '/system/config/batch',
method: 'put',
data: configs
})
}