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

This commit is contained in:
卡若
2026-03-08 10:32:52 +08:00
parent 33b212a58e
commit 6df79fd528

View File

@@ -50,6 +50,10 @@ const DEFAULT_CONFIG: MatchConfig = {
} }
const ICONS = ['⭐', '👥', '❤️', '🎮', '💼', '🚀', '💡', '🎯', '🔥', '✨'] const ICONS = ['⭐', '👥', '❤️', '🎮', '💼', '🚀', '💡', '🎯', '🔥', '✨']
interface PoolCounts {
vip: number; complete: number; all: number
}
export function MatchPoolTab() { export function MatchPoolTab() {
const [config, setConfig] = useState<MatchConfig>(DEFAULT_CONFIG) const [config, setConfig] = useState<MatchConfig>(DEFAULT_CONFIG)
const [isLoading, setIsLoading] = useState(true) const [isLoading, setIsLoading] = useState(true)
@@ -57,6 +61,17 @@ export function MatchPoolTab() {
const [showTypeModal, setShowTypeModal] = useState(false) const [showTypeModal, setShowTypeModal] = useState(false)
const [editingType, setEditingType] = useState<MatchType | null>(null) const [editingType, setEditingType] = useState<MatchType | null>(null)
const [formData, setFormData] = useState({ id: '', label: '', matchLabel: '', icon: '⭐', matchFromDB: false, showJoinAfterMatch: true, price: 1, enabled: true }) const [formData, setFormData] = useState({ id: '', label: '', matchLabel: '', icon: '⭐', matchFromDB: false, showJoinAfterMatch: true, price: 1, enabled: true })
const [poolCounts, setPoolCounts] = useState<PoolCounts | null>(null)
const [poolCountsLoading, setPoolCountsLoading] = useState(false)
const loadPoolCounts = async () => {
setPoolCountsLoading(true)
try {
const data = await get<{ success?: boolean; data?: PoolCounts }>('/api/db/match-pool-counts')
if (data?.success && data.data) setPoolCounts(data.data)
} catch (e) { console.error('加载池子人数失败:', e) }
finally { setPoolCountsLoading(false) }
}
const loadConfig = async () => { const loadConfig = async () => {
setIsLoading(true) setIsLoading(true)