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