sync: soul-admin 页面 | 原因: 前端页面修改

This commit is contained in:
卡若
2026-03-08 11:25:37 +08:00
parent 244646cdca
commit 669ee4ba3e

View File

@@ -78,7 +78,13 @@ export function MatchPoolTab() {
try {
const data = await get<{ success?: boolean; data?: MatchConfig; config?: MatchConfig }>('/api/db/config/full?key=match_config')
const c = (data as { data?: MatchConfig })?.data ?? (data as { config?: MatchConfig })?.config
if (c) setConfig({ ...DEFAULT_CONFIG, ...c, poolSettings: c.poolSettings ?? DEFAULT_POOL })
if (c) {
let ps = c.poolSettings ?? DEFAULT_POOL
if (ps.poolSource && !Array.isArray(ps.poolSource)) {
ps = { ...ps, poolSource: [ps.poolSource as unknown as string] }
}
setConfig({ ...DEFAULT_CONFIG, ...c, poolSettings: ps })
}
} catch (e) { console.error('加载匹配配置失败:', e) }
finally { setIsLoading(false) }
}