feat(admin): complete integration of auth, delivery, and system infrastructure modules

This commit is contained in:
comlibmb
2026-02-18 23:30:39 +08:00
parent 7b27694690
commit 5d00e3d74e
37 changed files with 2830 additions and 1075 deletions

View File

@@ -0,0 +1,41 @@
import { rpcOrNull, rpcOrValue } from '@/services/analytics/rpc.uts'
/**
* 系统配置项模型
*/
export type SystemConfig = {
config_key : string
config_value : UTSJSONObject
description ?: string
updated_at ?: string
}
/**
* 获取指定键的系统配置
*/
export async function getSystemConfig(key : string) : Promise<UTSJSONObject | null> {
const res = await rpcOrNull('rpc_admin_system_config_get', {
p_key: key
} as UTSJSONObject)
if (res == null) return null
return res as UTSJSONObject
}
/**
* 保存/更新系统配置
*/
export async function saveSystemConfig(key : string, value : UTSJSONObject, description : string | null = null) : Promise<boolean> {
const ok = await rpcOrValue('rpc_admin_system_config_save', {
p_key: key,
p_value: value,
p_description: description
} as any)
return ok === true
}
/**
* 批量获取配置 (可选扩展)
* 逻辑:如果后续有需求,可以补齐 rpc_admin_system_config_batch_get
*/