'use client'
import { useState } from 'react'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card'
import { Button } from '@/components/ui/Button'
import { Modal } from '@/components/ui/Modal'
import { SuccessTag, PendingTag, WarningTag } from '@/components/ui/Tag'
import {
Search,
Plus,
Users,
TrendingUp,
TrendingDown,
Mail,
Copy,
CheckCircle,
Clock,
MoreVertical
} from 'lucide-react'
// 模拟代理商列表
const mockAgencies = [
{
id: 'agency-001',
name: '星耀传媒',
email: 'contact@xingyao.com',
status: 'active',
creatorCount: 50,
projectCount: 8,
passRate: 92,
trend: 'up',
joinedAt: '2025-06-15',
},
{
id: 'agency-002',
name: '创意无限',
email: 'hello@chuangyi.com',
status: 'active',
creatorCount: 35,
projectCount: 5,
passRate: 88,
trend: 'up',
joinedAt: '2025-08-20',
},
{
id: 'agency-003',
name: '美妆达人MCN',
email: 'biz@meizhuang.com',
status: 'active',
creatorCount: 28,
projectCount: 4,
passRate: 75,
trend: 'down',
joinedAt: '2025-10-10',
},
{
id: 'agency-004',
name: '时尚风向标',
email: 'info@shishang.com',
status: 'pending',
creatorCount: 0,
projectCount: 0,
passRate: 0,
trend: 'stable',
joinedAt: '2026-02-01',
},
]
function StatusTag({ status }: { status: string }) {
if (status === 'active') return
管理合作代理商,查看代理商绩效数据
总代理商
{mockAgencies.length}
已激活
{mockAgencies.filter(a => a.status === 'active').length}
待接受
{mockAgencies.filter(a => a.status === 'pending').length}
平均通过率
{Math.round(mockAgencies.filter(a => a.status === 'active').reduce((sum, a) => sum + a.passRate, 0) / mockAgencies.filter(a => a.status === 'active').length)}%
| 代理商 | 状态 | 达人数 | 项目数 | 通过率 | 加入时间 | 操作 |
|---|---|---|---|---|---|---|
|
{agency.name}
{agency.email}
|
|
{agency.creatorCount} | {agency.projectCount} |
{agency.status === 'active' ? (
= 90 ? 'text-accent-green' : agency.passRate >= 80 ? 'text-accent-indigo' : 'text-orange-400'}`}>
{agency.passRate}%
{agency.trend === 'up' &&
) : (
-
)}
|
{agency.joinedAt} |
输入代理商邮箱,系统将发送邀请链接。
{inviteLink}