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

This commit is contained in:
卡若
2026-03-08 11:26:01 +08:00
parent 669ee4ba3e
commit 596cd51d4f

View File

@@ -151,21 +151,31 @@ export function MatchPoolTab() {
<CardContent className="space-y-6">
<div className="space-y-3">
<Label className="text-gray-300"></Label>
<p className="text-gray-500 text-xs"></p>
<div className="grid grid-cols-1 md:grid-cols-3 gap-3">
{([
{ value: 'vip' as const, label: '超级个体VIP会员', desc: '仅匹配付费 ¥1980 的VIP会员', icon: '👑', countKey: 'vip' as const },
{ value: 'complete' as const, label: '完善资料用户', desc: '已完善联系方式+业务信息的用户', icon: '✅', countKey: 'complete' as const },
{ value: 'all' as const, label: '全部流量池', desc: '所有已注册用户(含未完善资料)', icon: '👥', countKey: 'all' as const },
{ value: 'vip', label: '超级个体VIP会员', desc: '付费 ¥1980 的VIP会员', icon: '👑', countKey: 'vip' as const },
{ value: 'complete', label: '完善资料用户', desc: '符合下方完善度要求的用户', icon: '✅', countKey: 'complete' as const },
{ value: 'all', label: '全部用户', desc: '所有已注册用户', icon: '👥', countKey: 'all' as const },
]).map(opt => {
const ps = config.poolSettings ?? DEFAULT_POOL
const selected = ps.poolSource === opt.value
const sources = Array.isArray(ps.poolSource) ? ps.poolSource : [ps.poolSource]
const selected = sources.includes(opt.value)
const count = poolCounts?.[opt.countKey]
const toggleSource = () => {
const cur = Array.isArray(ps.poolSource) ? [...ps.poolSource] : [ps.poolSource as string]
const next = selected ? cur.filter(v => v !== opt.value) : [...cur, opt.value]
if (next.length === 0) next.push(opt.value)
setConfig({ ...config, poolSettings: { ...ps, poolSource: next } })
}
return (
<button key={opt.value} type="button"
onClick={() => setConfig({ ...config, poolSettings: { ...(config.poolSettings ?? DEFAULT_POOL), poolSource: opt.value } })}
<button key={opt.value} type="button" onClick={toggleSource}
className={`p-4 rounded-lg border text-left transition-all ${selected ? 'border-[#38bdac] bg-[#38bdac]/10' : 'border-gray-700 bg-[#0a1628] hover:border-gray-600'}`}>
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
<div className={`w-5 h-5 rounded border-2 flex items-center justify-center text-xs ${selected ? 'border-[#38bdac] bg-[#38bdac] text-white' : 'border-gray-600'}`}>
{selected && '✓'}
</div>
<span className="text-xl">{opt.icon}</span>
<span className={`text-sm font-medium ${selected ? 'text-[#38bdac]' : 'text-gray-300'}`}>{opt.label}</span>
</div>