第 5 阶段:纠纷、通知与后台-1

This commit is contained in:
yml
2026-05-22 16:34:32 +08:00
parent 9ebdfab078
commit 99f9df7bcd
32 changed files with 1711 additions and 8 deletions
+27
View File
@@ -0,0 +1,27 @@
import { apiClient } from './client'
export interface SystemConfig {
id: number
key: string
value: string
description: string
updated_by?: number
created_at: string
updated_at: string
}
interface ApiResponse<T> {
code: string
message: string
data: T
}
export async function fetchSystemConfigs() {
const { data } = await apiClient.get<ApiResponse<{ items: SystemConfig[] }>>('/admin/system-configs')
return data.data.items
}
export async function updateSystemConfig(key: string, payload: { value: string; description?: string }) {
const { data } = await apiClient.put<ApiResponse<SystemConfig>>(`/admin/system-configs/${key}`, payload)
return data.data
}