sync: soul-admin 页面 | 原因: 前端页面修改
This commit is contained in:
@@ -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) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user