+
+
配置管理
+
+ } type="primary" onClick={() => { setEditKey(''); setNewKey(''); setNewValue(''); setAddOpen(true) }}>新增配置
+ } onClick={() => qc.invalidateQueries({ queryKey: ['config'] })}>刷新
+
+
+
+
+
+
setAddOpen(false)} okText="保存">
+ setNewKey(e.target.value)} disabled={!!editKey} style={{ marginBottom: 12 }} />
+ setNewValue(e.target.value)} rows={3} />
+
+
+ )
+}
+
+export default ConfigPage
diff --git a/src/services/config-api.ts b/src/services/config-api.ts
new file mode 100644
index 0000000..b998f65
--- /dev/null
+++ b/src/services/config-api.ts
@@ -0,0 +1,12 @@
+import { api } from './http-client'
+
+export interface AppConfigItem { id: string; key: string; value: string; description: string | null; environment: string; updatedAt: string }
+export interface FeatureFlagItem { id: string; name: string; enabled: boolean; description: string | null; rolloutPct: number }
+export interface ChangeLogItem { id: string; entityType: string; entityId: string; field: string; oldValue: string | null; newValue: string | null; changedBy: string | null; createdAt: string }
+
+export function getConfig(): Promise<{ configs: AppConfigItem[]; flags: FeatureFlagItem[] }> { return api.get('/admin-api/config') }
+export function setConfig(key: string, value: string): Promise