feat: 为所有终端添加平台显示功能

- 新增 frontend/lib/platforms.ts 共享平台配置模块
- 支持6个平台: 抖音、小红书、B站、快手、微博、微信视频号
- 品牌方终端: 项目看板、项目详情、终审台列表添加平台显示
- 代理商终端: 工作台概览、审核台、Brief配置、达人管理、
  数据报表、消息中心、申诉处理添加平台显示
- 达人端: 任务列表添加平台显示
- 统一使用彩色头部条样式展示平台信息

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-02-06 18:53:51 +08:00
parent 964797d2e9
commit 0bfedb95c8
22 changed files with 1784 additions and 460 deletions

View File

@ -17,6 +17,7 @@ import {
FileText, FileText,
Video Video
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 申诉状态类型 // 申诉状态类型
type AppealStatus = 'pending' | 'processing' | 'approved' | 'rejected' type AppealStatus = 'pending' | 'processing' | 'approved' | 'rejected'
@ -31,6 +32,7 @@ interface Appeal {
taskTitle: string taskTitle: string
creatorId: string creatorId: string
creatorName: string creatorName: string
platform: string
type: AppealType type: AppealType
contentType: 'script' | 'video' contentType: 'script' | 'video'
reason: string reason: string
@ -48,6 +50,7 @@ const mockAppeals: Appeal[] = [
taskTitle: '夏日护肤推广脚本', taskTitle: '夏日护肤推广脚本',
creatorId: 'creator-001', creatorId: 'creator-001',
creatorName: '小美护肤', creatorName: '小美护肤',
platform: 'douyin',
type: 'ai', type: 'ai',
contentType: 'script', contentType: 'script',
reason: 'AI误判', reason: 'AI误判',
@ -61,6 +64,7 @@ const mockAppeals: Appeal[] = [
taskTitle: '新品口红试色', taskTitle: '新品口红试色',
creatorId: 'creator-002', creatorId: 'creator-002',
creatorName: '美妆Lisa', creatorName: '美妆Lisa',
platform: 'xiaohongshu',
type: 'agency', type: 'agency',
contentType: 'video', contentType: 'video',
reason: '审核标准不清晰', reason: '审核标准不清晰',
@ -74,6 +78,7 @@ const mockAppeals: Appeal[] = [
taskTitle: '健身器材推荐', taskTitle: '健身器材推荐',
creatorId: 'creator-003', creatorId: 'creator-003',
creatorName: '健身教练王', creatorName: '健身教练王',
platform: 'bilibili',
type: 'ai', type: 'ai',
contentType: 'script', contentType: 'script',
reason: '违禁词误判', reason: '违禁词误判',
@ -88,6 +93,7 @@ const mockAppeals: Appeal[] = [
taskTitle: '美妆新品测评', taskTitle: '美妆新品测评',
creatorId: 'creator-004', creatorId: 'creator-004',
creatorName: '达人小红', creatorName: '达人小红',
platform: 'xiaohongshu',
type: 'agency', type: 'agency',
contentType: 'video', contentType: 'video',
reason: '品牌调性理解差异', reason: '品牌调性理解差异',
@ -116,10 +122,19 @@ function AppealCard({ appeal }: { appeal: Appeal }) {
const status = statusConfig[appeal.status] const status = statusConfig[appeal.status]
const type = typeConfig[appeal.type] const type = typeConfig[appeal.type]
const StatusIcon = status.icon const StatusIcon = status.icon
const platform = getPlatformInfo(appeal.platform)
return ( return (
<Link href={`/agency/appeals/${appeal.id}`}> <Link href={`/agency/appeals/${appeal.id}`}>
<div className="p-4 rounded-xl bg-bg-elevated hover:bg-bg-elevated/80 transition-colors cursor-pointer"> <div className="rounded-xl bg-bg-elevated hover:bg-bg-elevated/80 transition-colors cursor-pointer overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-4 py-1.5 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{platform.icon}</span>
<span className={`text-xs font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<div className="p-4">
{/* 顶部:状态和类型 */} {/* 顶部:状态和类型 */}
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -168,6 +183,7 @@ function AppealCard({ appeal }: { appeal: Appeal }) {
{appeal.updatedAt && <span>: {appeal.updatedAt}</span>} {appeal.updatedAt && <span>: {appeal.updatedAt}</span>}
</div> </div>
</div> </div>
</div>
</Link> </Link>
) )
} }

View File

@ -15,6 +15,7 @@ import {
ChevronRight, ChevronRight,
Settings Settings
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟 Brief 列表 // 模拟 Brief 列表
const mockBriefs = [ const mockBriefs = [
@ -22,6 +23,7 @@ const mockBriefs = [
id: 'brief-001', id: 'brief-001',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
brandName: 'XX护肤品牌', brandName: 'XX护肤品牌',
platform: 'douyin',
status: 'configured', status: 'configured',
uploadedAt: '2026-02-01', uploadedAt: '2026-02-01',
configuredAt: '2026-02-02', configuredAt: '2026-02-02',
@ -33,6 +35,7 @@ const mockBriefs = [
id: 'brief-002', id: 'brief-002',
projectName: '新品口红系列', projectName: '新品口红系列',
brandName: 'XX美妆品牌', brandName: 'XX美妆品牌',
platform: 'xiaohongshu',
status: 'pending', status: 'pending',
uploadedAt: '2026-02-05', uploadedAt: '2026-02-05',
configuredAt: null, configuredAt: null,
@ -44,6 +47,7 @@ const mockBriefs = [
id: 'brief-003', id: 'brief-003',
projectName: '护肤品秋季活动', projectName: '护肤品秋季活动',
brandName: 'XX护肤品牌', brandName: 'XX护肤品牌',
platform: 'bilibili',
status: 'configured', status: 'configured',
uploadedAt: '2025-09-15', uploadedAt: '2025-09-15',
configuredAt: '2025-09-16', configuredAt: '2025-09-16',
@ -74,7 +78,7 @@ export default function AgencyBriefsPage() {
const configuredCount = mockBriefs.filter(b => b.status === 'configured').length const configuredCount = mockBriefs.filter(b => b.status === 'configured').length
return ( return (
<div className="space-y-6"> <div className="space-y-6 min-h-0">
{/* 页面标题 */} {/* 页面标题 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
@ -136,9 +140,18 @@ export default function AgencyBriefsPage() {
{/* Brief 列表 */} {/* Brief 列表 */}
<div className="grid grid-cols-1 gap-4"> <div className="grid grid-cols-1 gap-4">
{filteredBriefs.map((brief) => ( {filteredBriefs.map((brief) => {
const platform = getPlatformInfo(brief.platform)
return (
<Link key={brief.id} href={`/agency/briefs/${brief.id}`}> <Link key={brief.id} href={`/agency/briefs/${brief.id}`}>
<Card className="hover:border-accent-indigo/50 transition-colors cursor-pointer"> <Card className="hover:border-accent-indigo/50 transition-colors cursor-pointer overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-6 py-2 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-2`}>
<span className="text-base">{platform.icon}</span>
<span className={`text-sm font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<CardContent className="py-4"> <CardContent className="py-4">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
@ -201,7 +214,8 @@ export default function AgencyBriefsPage() {
</CardContent> </CardContent>
</Card> </Card>
</Link> </Link>
))} )
})}
</div> </div>
{filteredBriefs.length === 0 && ( {filteredBriefs.length === 0 && (

View File

@ -27,6 +27,7 @@ import {
FolderPlus, FolderPlus,
X X
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 任务进度阶段 // 任务进度阶段
type TaskStage = 'script_pending' | 'script_ai_review' | 'script_agency_review' | 'script_brand_review' | type TaskStage = 'script_pending' | 'script_ai_review' | 'script_agency_review' | 'script_brand_review' |
@ -50,6 +51,7 @@ interface CreatorTask {
id: string id: string
name: string name: string
projectName: string projectName: string
platform: string
stage: TaskStage stage: TaskStage
appealRemaining: number appealRemaining: number
appealUsed: number appealUsed: number
@ -95,8 +97,8 @@ const mockCreators: Creator[] = [
trend: 'up', trend: 'up',
joinedAt: '2025-08-15', joinedAt: '2025-08-15',
tasks: [ tasks: [
{ id: 'task-001', name: '夏日护肤推广', projectName: 'XX品牌618', stage: 'video_agency_review', appealRemaining: 1, appealUsed: 0 }, { id: 'task-001', name: '夏日护肤推广', projectName: 'XX品牌618', platform: 'douyin', stage: 'video_agency_review', appealRemaining: 1, appealUsed: 0 },
{ id: 'task-002', name: '防晒霜测评', projectName: 'XX品牌618', stage: 'script_brand_review', appealRemaining: 0, appealUsed: 1 }, { id: 'task-002', name: '防晒霜测评', projectName: 'XX品牌618', platform: 'douyin', stage: 'script_brand_review', appealRemaining: 0, appealUsed: 1 },
], ],
}, },
{ {
@ -112,7 +114,7 @@ const mockCreators: Creator[] = [
trend: 'stable', trend: 'stable',
joinedAt: '2025-10-20', joinedAt: '2025-10-20',
tasks: [ tasks: [
{ id: 'task-003', name: '新品口红试色', projectName: '口红系列推广', stage: 'video_pending', appealRemaining: 2, appealUsed: 0 }, { id: 'task-003', name: '新品口红试色', projectName: '口红系列推广', platform: 'xiaohongshu', stage: 'video_pending', appealRemaining: 2, appealUsed: 0 },
], ],
}, },
{ {
@ -128,7 +130,7 @@ const mockCreators: Creator[] = [
trend: 'up', trend: 'up',
joinedAt: '2025-12-01', joinedAt: '2025-12-01',
tasks: [ tasks: [
{ id: 'task-004', name: '健身器材使用教程', projectName: 'XX运动品牌', stage: 'script_ai_review', appealRemaining: 1, appealUsed: 0 }, { id: 'task-004', name: '健身器材使用教程', projectName: 'XX运动品牌', platform: 'bilibili', stage: 'script_ai_review', appealRemaining: 1, appealUsed: 0 },
], ],
}, },
{ {
@ -304,7 +306,7 @@ export default function AgencyCreatorsPage() {
} }
return ( return (
<div className="space-y-6"> <div className="space-y-6 min-h-0">
{/* 页面标题 */} {/* 页面标题 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
@ -387,8 +389,8 @@ export default function AgencyCreatorsPage() {
{/* 达人列表 */} {/* 达人列表 */}
<Card> <Card>
<CardContent className="p-0"> <CardContent className="p-0 overflow-x-auto">
<table className="w-full"> <table className="w-full min-w-[900px]">
<thead> <thead>
<tr className="border-b border-border-subtle text-left text-sm text-text-secondary bg-bg-elevated"> <tr className="border-b border-border-subtle text-left text-sm text-text-secondary bg-bg-elevated">
<th className="px-6 py-4 font-medium"></th> <th className="px-6 py-4 font-medium"></th>
@ -556,8 +558,18 @@ export default function AgencyCreatorsPage() {
<div className="ml-9 pl-6 border-l-2 border-accent-indigo/30"> <div className="ml-9 pl-6 border-l-2 border-accent-indigo/30">
<div className="text-sm font-medium text-text-secondary mb-3"></div> <div className="text-sm font-medium text-text-secondary mb-3"></div>
<div className="space-y-2"> <div className="space-y-2">
{creator.tasks.map(task => ( {creator.tasks.map(task => {
<div key={task.id} className="flex items-center justify-between p-4 bg-bg-card rounded-xl"> const taskPlatform = getPlatformInfo(task.platform)
return (
<div key={task.id} className="bg-bg-card rounded-xl overflow-hidden">
{/* 平台顶部条 */}
{taskPlatform && (
<div className={`px-4 py-1.5 ${taskPlatform.bgColor} border-b ${taskPlatform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{taskPlatform.icon}</span>
<span className={`text-xs font-medium ${taskPlatform.textColor}`}>{taskPlatform.name}</span>
</div>
)}
<div className="flex items-center justify-between p-4">
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<div> <div>
<div className="font-medium text-text-primary">{task.name}</div> <div className="font-medium text-text-primary">{task.name}</div>
@ -582,7 +594,9 @@ export default function AgencyCreatorsPage() {
</Button> </Button>
</div> </div>
</div> </div>
))} </div>
)
})}
</div> </div>
</div> </div>
</td> </td>

View File

@ -17,6 +17,7 @@ import {
MoreVertical, MoreVertical,
PlusCircle PlusCircle
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 消息类型 // 消息类型
interface Message { interface Message {
@ -29,6 +30,7 @@ interface Message {
icon: typeof Bell icon: typeof Bell
iconColor: string iconColor: string
bgColor: string bgColor: string
platform?: string
// 申诉次数请求专用字段 // 申诉次数请求专用字段
appealRequest?: { appealRequest?: {
creatorName: string creatorName: string
@ -50,6 +52,7 @@ const mockMessages: Message[] = [
icon: PlusCircle, icon: PlusCircle,
iconColor: 'text-accent-amber', iconColor: 'text-accent-amber',
bgColor: 'bg-accent-amber/20', bgColor: 'bg-accent-amber/20',
platform: 'douyin',
appealRequest: { appealRequest: {
creatorName: '李小红', creatorName: '李小红',
taskName: '618美妆推广视频', taskName: '618美妆推广视频',
@ -67,6 +70,7 @@ const mockMessages: Message[] = [
icon: FileText, icon: FileText,
iconColor: 'text-accent-indigo', iconColor: 'text-accent-indigo',
bgColor: 'bg-accent-indigo/20', bgColor: 'bg-accent-indigo/20',
platform: 'xiaohongshu',
}, },
{ {
id: 'msg-003', id: 'msg-003',
@ -78,6 +82,7 @@ const mockMessages: Message[] = [
icon: PlusCircle, icon: PlusCircle,
iconColor: 'text-accent-amber', iconColor: 'text-accent-amber',
bgColor: 'bg-accent-amber/20', bgColor: 'bg-accent-amber/20',
platform: 'xiaohongshu',
appealRequest: { appealRequest: {
creatorName: '美妆达人小王', creatorName: '美妆达人小王',
taskName: '双11护肤品种草', taskName: '双11护肤品种草',
@ -95,6 +100,7 @@ const mockMessages: Message[] = [
icon: CheckCircle, icon: CheckCircle,
iconColor: 'text-accent-green', iconColor: 'text-accent-green',
bgColor: 'bg-accent-green/20', bgColor: 'bg-accent-green/20',
platform: 'xiaohongshu',
}, },
{ {
id: 'msg-005', id: 'msg-005',
@ -106,6 +112,7 @@ const mockMessages: Message[] = [
icon: XCircle, icon: XCircle,
iconColor: 'text-accent-coral', iconColor: 'text-accent-coral',
bgColor: 'bg-accent-coral/20', bgColor: 'bg-accent-coral/20',
platform: 'bilibili',
}, },
{ {
id: 'msg-006', id: 'msg-006',
@ -117,6 +124,7 @@ const mockMessages: Message[] = [
icon: Users, icon: Users,
iconColor: 'text-purple-400', iconColor: 'text-purple-400',
bgColor: 'bg-purple-500/20', bgColor: 'bg-purple-500/20',
platform: 'douyin',
}, },
{ {
id: 'msg-007', id: 'msg-007',
@ -128,6 +136,7 @@ const mockMessages: Message[] = [
icon: AlertTriangle, icon: AlertTriangle,
iconColor: 'text-orange-400', iconColor: 'text-orange-400',
bgColor: 'bg-orange-500/20', bgColor: 'bg-orange-500/20',
platform: 'xiaohongshu',
}, },
{ {
id: 'msg-008', id: 'msg-008',
@ -139,6 +148,7 @@ const mockMessages: Message[] = [
icon: Video, icon: Video,
iconColor: 'text-purple-400', iconColor: 'text-purple-400',
bgColor: 'bg-purple-500/20', bgColor: 'bg-purple-500/20',
platform: 'bilibili',
}, },
] ]
@ -222,15 +232,23 @@ export default function AgencyMessagesPage() {
const Icon = message.icon const Icon = message.icon
const isAppealRequest = message.type === 'appeal_quota_request' const isAppealRequest = message.type === 'appeal_quota_request'
const appealStatus = message.appealRequest?.status const appealStatus = message.appealRequest?.status
const platform = message.platform ? getPlatformInfo(message.platform) : null
return ( return (
<Card <Card
key={message.id} key={message.id}
className={`transition-all ${ className={`transition-all overflow-hidden ${
!isAppealRequest ? 'cursor-pointer hover:border-accent-indigo/50' : '' !isAppealRequest ? 'cursor-pointer hover:border-accent-indigo/50' : ''
} ${!message.read ? 'border-l-4 border-l-accent-indigo' : ''}`} } ${!message.read ? 'border-l-4 border-l-accent-indigo' : ''}`}
onClick={() => !isAppealRequest && markAsRead(message.id)} onClick={() => !isAppealRequest && markAsRead(message.id)}
> >
{/* 平台顶部条 */}
{platform && (
<div className={`px-4 py-1.5 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{platform.icon}</span>
<span className={`text-xs font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<CardContent className="py-4"> <CardContent className="py-4">
<div className="flex items-start gap-4"> <div className="flex items-start gap-4">
<div className={`w-10 h-10 rounded-lg ${message.bgColor} flex items-center justify-center flex-shrink-0`}> <div className={`w-10 h-10 rounded-lg ${message.bgColor} flex items-center justify-center flex-shrink-0`}>

View File

@ -15,6 +15,7 @@ import {
MessageSquare, MessageSquare,
TrendingUp TrendingUp
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟统计数据 // 模拟统计数据
const stats = { const stats = {
@ -66,6 +67,7 @@ const projectOverview = [
{ {
id: 'proj-001', id: 'proj-001',
name: 'XX品牌618推广', name: 'XX品牌618推广',
platform: 'douyin',
total: 20, total: 20,
submitted: 15, submitted: 15,
passed: 10, passed: 10,
@ -76,6 +78,7 @@ const projectOverview = [
{ {
id: 'proj-002', id: 'proj-002',
name: '新品口红系列', name: '新品口红系列',
platform: 'xiaohongshu',
total: 12, total: 12,
submitted: 8, submitted: 8,
passed: 6, passed: 6,
@ -86,6 +89,7 @@ const projectOverview = [
{ {
id: 'proj-003', id: 'proj-003',
name: '护肤品秋季活动', name: '护肤品秋季活动',
platform: 'bilibili',
total: 15, total: 15,
submitted: 12, submitted: 12,
passed: 9, passed: 9,
@ -102,6 +106,7 @@ const pendingTasks = [
videoTitle: '夏日护肤推广', videoTitle: '夏日护肤推广',
creatorName: '小美护肤', creatorName: '小美护肤',
brandName: 'XX品牌', brandName: 'XX品牌',
platform: 'douyin',
aiScore: 85, aiScore: 85,
submittedAt: '2026-02-04 14:30', submittedAt: '2026-02-04 14:30',
hasHighRisk: false, hasHighRisk: false,
@ -111,6 +116,7 @@ const pendingTasks = [
videoTitle: '新品口红试色', videoTitle: '新品口红试色',
creatorName: '美妆达人Lisa', creatorName: '美妆达人Lisa',
brandName: 'XX品牌', brandName: 'XX品牌',
platform: 'xiaohongshu',
aiScore: 72, aiScore: 72,
submittedAt: '2026-02-04 13:45', submittedAt: '2026-02-04 13:45',
hasHighRisk: true, hasHighRisk: true,
@ -120,6 +126,7 @@ const pendingTasks = [
videoTitle: '健身器材开箱', videoTitle: '健身器材开箱',
creatorName: '健身教练王', creatorName: '健身教练王',
brandName: 'XX运动', brandName: 'XX运动',
platform: 'bilibili',
aiScore: 68, aiScore: 68,
submittedAt: '2026-02-04 14:50', submittedAt: '2026-02-04 14:50',
hasHighRisk: true, hasHighRisk: true,
@ -134,7 +141,7 @@ function UrgentLevelIcon({ level }: { level: string }) {
export default function AgencyDashboard() { export default function AgencyDashboard() {
return ( return (
<div className="space-y-6"> <div className="space-y-6 min-h-0">
{/* 页面标题 */} {/* 页面标题 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h1 className="text-2xl font-bold text-text-primary"></h1> <h1 className="text-2xl font-bold text-text-primary"></h1>
@ -251,10 +258,19 @@ export default function AgencyDashboard() {
<div className="space-y-4"> <div className="space-y-4">
{projectOverview.map((project) => { {projectOverview.map((project) => {
const totalReviewing = project.reviewingScript + project.reviewingVideo const totalReviewing = project.reviewingScript + project.reviewingVideo
const projectPlatform = getPlatformInfo(project.platform)
return ( return (
<div key={project.id} className="p-4 rounded-lg bg-bg-elevated"> <div key={project.id} className="p-4 rounded-lg bg-bg-elevated">
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
<span className="font-medium text-text-primary">{project.name}</span> <span className="font-medium text-text-primary">{project.name}</span>
{projectPlatform && (
<span className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium ${projectPlatform.bgColor} ${projectPlatform.textColor}`}>
<span>{projectPlatform.icon}</span>
{projectPlatform.name}
</span>
)}
</div>
<span className="text-sm text-text-secondary"> <span className="text-sm text-text-secondary">
{project.submitted}/{project.total} {project.submitted}/{project.total}
</span> </span>
@ -312,7 +328,7 @@ export default function AgencyDashboard() {
<CardHeader> <CardHeader>
<CardTitle className="flex items-center justify-between"> <CardTitle className="flex items-center justify-between">
<span></span> <span></span>
<Link href="/agency/tasks"> <Link href="/agency/review">
<Button variant="ghost" size="sm"> <Button variant="ghost" size="sm">
<ChevronRight size={16} /> <ChevronRight size={16} />
@ -326,6 +342,7 @@ export default function AgencyDashboard() {
<thead> <thead>
<tr className="border-b border-border-subtle text-left text-sm text-text-secondary"> <tr className="border-b border-border-subtle text-left text-sm text-text-secondary">
<th className="pb-3 font-medium"></th> <th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium"></th> <th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium"></th> <th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium">AI评分</th> <th className="pb-3 font-medium">AI评分</th>
@ -334,7 +351,9 @@ export default function AgencyDashboard() {
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{pendingTasks.map((task) => ( {pendingTasks.map((task) => {
const platform = getPlatformInfo(task.platform)
return (
<tr key={task.id} className="border-b border-border-subtle last:border-0 hover:bg-bg-elevated"> <tr key={task.id} className="border-b border-border-subtle last:border-0 hover:bg-bg-elevated">
<td className="py-4"> <td className="py-4">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -346,6 +365,14 @@ export default function AgencyDashboard() {
)} )}
</div> </div>
</td> </td>
<td className="py-4">
{platform && (
<span className={`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium ${platform.bgColor} ${platform.textColor} border ${platform.borderColor}`}>
<span>{platform.icon}</span>
{platform.name}
</span>
)}
</td>
<td className="py-4 text-text-secondary">{task.creatorName}</td> <td className="py-4 text-text-secondary">{task.creatorName}</td>
<td className="py-4 text-text-secondary">{task.brandName}</td> <td className="py-4 text-text-secondary">{task.brandName}</td>
<td className="py-4"> <td className="py-4">
@ -362,7 +389,8 @@ export default function AgencyDashboard() {
</Link> </Link>
</td> </td>
</tr> </tr>
))} )
})}
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -20,6 +20,7 @@ import {
File, File,
Check Check
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 时间范围类型 // 时间范围类型
type DateRange = 'week' | 'month' | 'quarter' | 'year' type DateRange = 'week' | 'month' | 'quarter' | 'year'
@ -113,10 +114,10 @@ const mockDataByRange: Record<DateRange, {
} }
const mockProjectStats = [ const mockProjectStats = [
{ name: 'XX品牌618推广', scripts: 45, videos: 38, passRate: 92 }, { name: 'XX品牌618推广', platform: 'douyin', scripts: 45, videos: 38, passRate: 92 },
{ name: '新品口红系列', scripts: 32, videos: 28, passRate: 85 }, { name: '新品口红系列', platform: 'xiaohongshu', scripts: 32, videos: 28, passRate: 85 },
{ name: '护肤品秋季活动', scripts: 28, videos: 25, passRate: 78 }, { name: '护肤品秋季活动', platform: 'bilibili', scripts: 28, videos: 25, passRate: 78 },
{ name: 'XX运动品牌', scripts: 51, videos: 37, passRate: 88 }, { name: 'XX运动品牌', platform: 'kuaishou', scripts: 51, videos: 37, passRate: 88 },
] ]
const mockCreatorRanking = [ const mockCreatorRanking = [
@ -399,6 +400,7 @@ export default function AgencyReportsPage() {
<thead> <thead>
<tr className="border-b border-border-subtle text-left text-sm text-text-secondary"> <tr className="border-b border-border-subtle text-left text-sm text-text-secondary">
<th className="pb-3 font-medium"></th> <th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium"></th>
<th className="pb-3 font-medium text-center"></th> <th className="pb-3 font-medium text-center"></th>
<th className="pb-3 font-medium text-center"></th> <th className="pb-3 font-medium text-center"></th>
<th className="pb-3 font-medium text-center"></th> <th className="pb-3 font-medium text-center"></th>
@ -406,9 +408,19 @@ export default function AgencyReportsPage() {
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{mockProjectStats.map((project) => ( {mockProjectStats.map((project) => {
const platform = getPlatformInfo(project.platform)
return (
<tr key={project.name} className="border-b border-border-subtle last:border-0"> <tr key={project.name} className="border-b border-border-subtle last:border-0">
<td className="py-4 font-medium text-text-primary">{project.name}</td> <td className="py-4 font-medium text-text-primary">{project.name}</td>
<td className="py-4">
{platform && (
<span className={`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium ${platform.bgColor} ${platform.textColor} border ${platform.borderColor}`}>
<span>{platform.icon}</span>
{platform.name}
</span>
)}
</td>
<td className="py-4 text-center text-text-secondary">{project.scripts}</td> <td className="py-4 text-center text-text-secondary">{project.scripts}</td>
<td className="py-4 text-center text-text-secondary">{project.videos}</td> <td className="py-4 text-center text-text-secondary">{project.videos}</td>
<td className="py-4 text-center"> <td className="py-4 text-center">
@ -425,7 +437,8 @@ export default function AgencyReportsPage() {
</div> </div>
</td> </td>
</tr> </tr>
))} )
})}
</tbody> </tbody>
</table> </table>
</CardContent> </CardContent>

View File

@ -18,6 +18,7 @@ import {
Eye, Eye,
File File
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟脚本待审列表 // 模拟脚本待审列表
const mockScriptTasks = [ const mockScriptTasks = [
@ -28,6 +29,7 @@ const mockScriptTasks = [
fileSize: '245 KB', fileSize: '245 KB',
creatorName: '小美护肤', creatorName: '小美护肤',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'douyin',
aiScore: 88, aiScore: 88,
riskLevel: 'low' as const, riskLevel: 'low' as const,
submittedAt: '2026-02-06 14:30', submittedAt: '2026-02-06 14:30',
@ -40,6 +42,7 @@ const mockScriptTasks = [
fileSize: '312 KB', fileSize: '312 KB',
creatorName: '美妆Lisa', creatorName: '美妆Lisa',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'xiaohongshu',
aiScore: 72, aiScore: 72,
riskLevel: 'medium' as const, riskLevel: 'medium' as const,
submittedAt: '2026-02-06 12:15', submittedAt: '2026-02-06 12:15',
@ -52,6 +55,7 @@ const mockScriptTasks = [
fileSize: '189 KB', fileSize: '189 KB',
creatorName: '健身教练王', creatorName: '健身教练王',
projectName: 'XX运动品牌', projectName: 'XX运动品牌',
platform: 'bilibili',
aiScore: 95, aiScore: 95,
riskLevel: 'low' as const, riskLevel: 'low' as const,
submittedAt: '2026-02-06 10:00', submittedAt: '2026-02-06 10:00',
@ -64,6 +68,7 @@ const mockScriptTasks = [
fileSize: '278 KB', fileSize: '278 KB',
creatorName: '达人D', creatorName: '达人D',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'kuaishou',
aiScore: 62, aiScore: 62,
riskLevel: 'high' as const, riskLevel: 'high' as const,
submittedAt: '2026-02-06 09:00', submittedAt: '2026-02-06 09:00',
@ -80,6 +85,7 @@ const mockVideoTasks = [
fileSize: '128 MB', fileSize: '128 MB',
creatorName: '小美护肤', creatorName: '小美护肤',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'douyin',
aiScore: 85, aiScore: 85,
riskLevel: 'low' as const, riskLevel: 'low' as const,
duration: '02:15', duration: '02:15',
@ -93,6 +99,7 @@ const mockVideoTasks = [
fileSize: '256 MB', fileSize: '256 MB',
creatorName: '美妆Lisa', creatorName: '美妆Lisa',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'xiaohongshu',
aiScore: 68, aiScore: 68,
riskLevel: 'medium' as const, riskLevel: 'medium' as const,
duration: '03:42', duration: '03:42',
@ -106,6 +113,7 @@ const mockVideoTasks = [
fileSize: '198 MB', fileSize: '198 MB',
creatorName: '达人C', creatorName: '达人C',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'bilibili',
aiScore: 58, aiScore: 58,
riskLevel: 'high' as const, riskLevel: 'high' as const,
duration: '04:20', duration: '04:20',
@ -119,6 +127,7 @@ const mockVideoTasks = [
fileSize: '167 MB', fileSize: '167 MB',
creatorName: '达人D', creatorName: '达人D',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'wechat',
aiScore: 91, aiScore: 91,
riskLevel: 'low' as const, riskLevel: 'low' as const,
duration: '01:45', duration: '01:45',
@ -145,6 +154,7 @@ type VideoTask = typeof mockVideoTasks[0]
function ScriptTaskCard({ task }: { task: ScriptTask }) { function ScriptTaskCard({ task }: { task: ScriptTask }) {
const riskConfig = riskLevelConfig[task.riskLevel] const riskConfig = riskLevelConfig[task.riskLevel]
const platform = getPlatformInfo(task.platform)
const handleDownload = (e: React.MouseEvent) => { const handleDownload = (e: React.MouseEvent) => {
e.stopPropagation() e.stopPropagation()
@ -153,7 +163,15 @@ function ScriptTaskCard({ task }: { task: ScriptTask }) {
} }
return ( return (
<div className="p-4 rounded-xl bg-bg-elevated"> <div className="rounded-xl bg-bg-elevated overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-4 py-1.5 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{platform.icon}</span>
<span className={`text-xs font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<div className="p-4">
{/* 顶部:达人名 · 任务名 + 状态标签 */} {/* 顶部:达人名 · 任务名 + 状态标签 */}
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -199,11 +217,13 @@ function ScriptTaskCard({ task }: { task: ScriptTask }) {
</Link> </Link>
</div> </div>
</div> </div>
</div>
) )
} }
function VideoTaskCard({ task }: { task: VideoTask }) { function VideoTaskCard({ task }: { task: VideoTask }) {
const riskConfig = riskLevelConfig[task.riskLevel] const riskConfig = riskLevelConfig[task.riskLevel]
const platform = getPlatformInfo(task.platform)
const handleDownload = (e: React.MouseEvent) => { const handleDownload = (e: React.MouseEvent) => {
e.stopPropagation() e.stopPropagation()
@ -212,7 +232,15 @@ function VideoTaskCard({ task }: { task: VideoTask }) {
} }
return ( return (
<div className="p-4 rounded-xl bg-bg-elevated"> <div className="rounded-xl bg-bg-elevated overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-4 py-1.5 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{platform.icon}</span>
<span className={`text-xs font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<div className="p-4">
{/* 顶部:达人名 · 任务名 + 状态标签 */} {/* 顶部:达人名 · 任务名 + 状态标签 */}
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -258,6 +286,7 @@ function VideoTaskCard({ task }: { task: VideoTask }) {
</Link> </Link>
</div> </div>
</div> </div>
</div>
) )
} }
@ -276,7 +305,7 @@ export default function AgencyReviewListPage() {
) )
return ( return (
<div className="space-y-6"> <div className="space-y-6 min-h-0">
{/* 页面标题 */} {/* 页面标题 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>

View File

@ -238,7 +238,7 @@ export default function AgenciesManagePage() {
} }
return ( return (
<div className="space-y-6"> <div className="space-y-6 min-h-0">
{/* 页面标题 */} {/* 页面标题 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
@ -325,8 +325,8 @@ export default function AgenciesManagePage() {
{/* 代理商列表 */} {/* 代理商列表 */}
<Card> <Card>
<CardContent className="p-0"> <CardContent className="p-0 overflow-x-auto">
<table className="w-full"> <table className="w-full min-w-[900px]">
<thead> <thead>
<tr className="border-b border-border-subtle text-left text-sm text-text-secondary bg-bg-elevated"> <tr className="border-b border-border-subtle text-left text-sm text-text-secondary bg-bg-elevated">
<th className="px-6 py-4 font-medium"></th> <th className="px-6 py-4 font-medium"></th>

View File

@ -1,13 +1,23 @@
'use client' 'use client'
import { useState } from 'react' import { useState } from 'react'
import { Plus, FileText, Upload, Trash2, Edit } from 'lucide-react' import { Plus, FileText, Upload, Trash2, Edit, Check, Search, X, Eye } from 'lucide-react'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card'
import { Button } from '@/components/ui/Button' import { Button } from '@/components/ui/Button'
import { Input } from '@/components/ui/Input' import { Input } from '@/components/ui/Input'
import { Modal } from '@/components/ui/Modal' import { Modal } from '@/components/ui/Modal'
import { SuccessTag, PendingTag } from '@/components/ui/Tag' import { SuccessTag, PendingTag } from '@/components/ui/Tag'
// 平台选项
const platformOptions = [
{ id: 'douyin', name: '抖音', icon: '🎵', color: 'bg-[#1a1a1a]' },
{ id: 'xiaohongshu', name: '小红书', icon: '📕', color: 'bg-[#fe2c55]' },
{ id: 'bilibili', name: 'B站', icon: '📺', color: 'bg-[#00a1d6]' },
{ id: 'kuaishou', name: '快手', icon: '⚡', color: 'bg-[#ff4906]' },
{ id: 'weibo', name: '微博', icon: '🔴', color: 'bg-[#e6162d]' },
{ id: 'wechat', name: '微信视频号', icon: '💬', color: 'bg-[#07c160]' },
]
// 模拟 Brief 列表 // 模拟 Brief 列表
const mockBriefs = [ const mockBriefs = [
{ {
@ -15,6 +25,7 @@ const mockBriefs = [
name: '2024 夏日护肤活动', name: '2024 夏日护肤活动',
description: '夏日护肤系列产品推广规范', description: '夏日护肤系列产品推广规范',
status: 'active', status: 'active',
platforms: ['douyin', 'xiaohongshu'],
rulesCount: 12, rulesCount: 12,
creatorsCount: 45, creatorsCount: 45,
createdAt: '2024-01-15', createdAt: '2024-01-15',
@ -25,6 +36,7 @@ const mockBriefs = [
name: '新品口红上市', name: '新品口红上市',
description: '春季新品口红营销 Brief', description: '春季新品口红营销 Brief',
status: 'active', status: 'active',
platforms: ['xiaohongshu', 'bilibili'],
rulesCount: 8, rulesCount: 8,
creatorsCount: 32, creatorsCount: 32,
createdAt: '2024-02-01', createdAt: '2024-02-01',
@ -35,6 +47,7 @@ const mockBriefs = [
name: '年货节活动', name: '年货节活动',
description: '春节年货促销活动规范', description: '春节年货促销活动规范',
status: 'archived', status: 'archived',
platforms: ['douyin', 'kuaishou'],
rulesCount: 15, rulesCount: 15,
creatorsCount: 78, creatorsCount: 78,
createdAt: '2024-01-01', createdAt: '2024-01-01',
@ -43,40 +56,104 @@ const mockBriefs = [
] ]
export default function BriefsPage() { export default function BriefsPage() {
const [briefs] = useState(mockBriefs) const [briefs, setBriefs] = useState(mockBriefs)
const [showCreateModal, setShowCreateModal] = useState(false) const [showCreateModal, setShowCreateModal] = useState(false)
const [searchQuery, setSearchQuery] = useState('') const [searchQuery, setSearchQuery] = useState('')
// 新建 Brief 表单
const [newBriefName, setNewBriefName] = useState('')
const [newBriefDesc, setNewBriefDesc] = useState('')
const [selectedPlatforms, setSelectedPlatforms] = useState<string[]>([])
// 查看详情
const [showDetailModal, setShowDetailModal] = useState(false)
const [selectedBrief, setSelectedBrief] = useState<typeof mockBriefs[0] | null>(null)
const filteredBriefs = briefs.filter((brief) => const filteredBriefs = briefs.filter((brief) =>
brief.name.toLowerCase().includes(searchQuery.toLowerCase()) brief.name.toLowerCase().includes(searchQuery.toLowerCase())
) )
// 切换平台选择
const togglePlatform = (platformId: string) => {
setSelectedPlatforms(prev =>
prev.includes(platformId)
? prev.filter(id => id !== platformId)
: [...prev, platformId]
)
}
// 获取平台信息
const getPlatformInfo = (platformId: string) => {
return platformOptions.find(p => p.id === platformId)
}
// 创建 Brief
const handleCreateBrief = () => {
if (!newBriefName.trim() || selectedPlatforms.length === 0) return
const newBrief = {
id: `brief-${Date.now()}`,
name: newBriefName,
description: newBriefDesc,
status: 'active' as const,
platforms: selectedPlatforms,
rulesCount: 0,
creatorsCount: 0,
createdAt: new Date().toISOString().split('T')[0],
updatedAt: new Date().toISOString().split('T')[0],
}
setBriefs([newBrief, ...briefs])
setShowCreateModal(false)
setNewBriefName('')
setNewBriefDesc('')
setSelectedPlatforms([])
}
// 查看 Brief 详情
const viewBriefDetail = (brief: typeof mockBriefs[0]) => {
setSelectedBrief(brief)
setShowDetailModal(true)
}
// 删除 Brief
const handleDeleteBrief = (id: string) => {
setBriefs(briefs.filter(b => b.id !== id))
}
return ( return (
<div className="space-y-6"> <div className="space-y-6">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<h1 className="text-2xl font-bold text-gray-900">Brief </h1> <div>
<Button icon={Plus} onClick={() => setShowCreateModal(true)}> <h1 className="text-2xl font-bold text-text-primary">Brief </h1>
<p className="text-sm text-text-secondary mt-1"> Brief</p>
</div>
<Button onClick={() => setShowCreateModal(true)}>
<Plus size={16} />
Brief Brief
</Button> </Button>
</div> </div>
{/* 搜索 */} {/* 搜索 */}
<div className="max-w-md"> <div className="relative max-w-md">
<Input <Search size={18} className="absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary" />
<input
type="text"
placeholder="搜索 Brief..." placeholder="搜索 Brief..."
value={searchQuery} value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)} onChange={(e) => setSearchQuery(e.target.value)}
className="w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-xl bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo"
/> />
</div> </div>
{/* Brief 列表 */} {/* Brief 列表 */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{filteredBriefs.map((brief) => ( {filteredBriefs.map((brief) => (
<Card key={brief.id} className="hover:shadow-md transition-shadow"> <Card key={brief.id} className="hover:shadow-md transition-shadow border border-border-subtle">
<CardContent className="p-5"> <CardContent className="p-5">
<div className="flex items-start justify-between mb-3"> <div className="flex items-start justify-between mb-3">
<div className="p-2 bg-blue-50 rounded-lg"> <div className="p-2 bg-accent-indigo/15 rounded-lg">
<FileText size={24} className="text-blue-600" /> <FileText size={24} className="text-accent-indigo" />
</div> </div>
{brief.status === 'active' ? ( {brief.status === 'active' ? (
<SuccessTag>使</SuccessTag> <SuccessTag>使</SuccessTag>
@ -85,24 +162,57 @@ export default function BriefsPage() {
)} )}
</div> </div>
<h3 className="font-semibold text-gray-900 mb-1">{brief.name}</h3> <h3 className="font-semibold text-text-primary mb-1">{brief.name}</h3>
<p className="text-sm text-gray-500 mb-4">{brief.description}</p> <p className="text-sm text-text-tertiary mb-3">{brief.description}</p>
<div className="flex gap-4 text-sm text-gray-500 mb-4"> {/* 平台标签 */}
<div className="flex flex-wrap gap-1.5 mb-3">
{brief.platforms.map(platformId => {
const platform = getPlatformInfo(platformId)
return platform ? (
<span
key={platformId}
className="inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-bg-elevated text-xs text-text-secondary"
>
<span>{platform.icon}</span>
{platform.name}
</span>
) : null
})}
</div>
<div className="flex gap-4 text-sm text-text-tertiary mb-4">
<span>{brief.rulesCount} </span> <span>{brief.rulesCount} </span>
<span>{brief.creatorsCount} </span> <span>{brief.creatorsCount} </span>
</div> </div>
<div className="flex items-center justify-between pt-3 border-t"> <div className="flex items-center justify-between pt-3 border-t border-border-subtle">
<span className="text-xs text-gray-400"> <span className="text-xs text-text-tertiary">
{brief.updatedAt} {brief.updatedAt}
</span> </span>
<div className="flex gap-2"> <div className="flex gap-1">
<button type="button" className="p-1 hover:bg-gray-100 rounded"> <button
<Edit size={16} className="text-gray-500" /> type="button"
onClick={() => viewBriefDetail(brief)}
className="p-1.5 hover:bg-bg-elevated rounded-lg transition-colors"
title="查看详情"
>
<Eye size={16} className="text-text-tertiary hover:text-accent-indigo" />
</button> </button>
<button type="button" className="p-1 hover:bg-gray-100 rounded"> <button
<Trash2 size={16} className="text-gray-500" /> type="button"
className="p-1.5 hover:bg-bg-elevated rounded-lg transition-colors"
title="编辑"
>
<Edit size={16} className="text-text-tertiary hover:text-accent-indigo" />
</button>
<button
type="button"
onClick={() => handleDeleteBrief(brief.id)}
className="p-1.5 hover:bg-accent-coral/10 rounded-lg transition-colors"
title="删除"
>
<Trash2 size={16} className="text-text-tertiary hover:text-accent-coral" />
</button> </button>
</div> </div>
</div> </div>
@ -111,58 +221,210 @@ export default function BriefsPage() {
))} ))}
{/* 新建卡片 */} {/* 新建卡片 */}
<Card <button
className="border-dashed cursor-pointer hover:border-blue-400 hover:bg-blue-50/50 transition-colors" type="button"
onClick={() => setShowCreateModal(true)} onClick={() => setShowCreateModal(true)}
className="p-5 rounded-xl border-2 border-dashed border-border-subtle hover:border-accent-indigo hover:bg-accent-indigo/5 transition-all flex flex-col items-center justify-center min-h-[240px]"
> >
<CardContent className="p-5 flex flex-col items-center justify-center h-full min-h-[200px]"> <div className="p-3 bg-bg-elevated rounded-full mb-3">
<div className="p-3 bg-gray-100 rounded-full mb-3"> <Plus size={24} className="text-text-tertiary" />
<Plus size={24} className="text-gray-500" />
</div> </div>
<span className="text-gray-500"> Brief</span> <span className="text-text-tertiary font-medium"> Brief</span>
</CardContent> </button>
</Card>
</div> </div>
{/* 新建 Brief 弹窗 */} {/* 新建 Brief 弹窗 */}
<Modal <Modal
isOpen={showCreateModal} isOpen={showCreateModal}
onClose={() => setShowCreateModal(false)} onClose={() => {
setShowCreateModal(false)
setNewBriefName('')
setNewBriefDesc('')
setSelectedPlatforms([])
}}
title="新建 Brief" title="新建 Brief"
size="md" size="lg"
> >
<div className="space-y-4"> <div className="space-y-5">
<Input label="Brief 名称" placeholder="输入 Brief 名称" />
<div> <div>
<label className="block text-sm font-medium text-gray-700 mb-1"></label> <label className="block text-sm font-medium text-text-primary mb-2">Brief </label>
<input
type="text"
value={newBriefName}
onChange={(e) => setNewBriefName(e.target.value)}
placeholder="输入 Brief 名称"
className="w-full px-4 py-2.5 border border-border-subtle rounded-xl bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo"
/>
</div>
<div>
<label className="block text-sm font-medium text-text-primary mb-2"></label>
<textarea <textarea
className="w-full h-20 p-3 border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-blue-500" value={newBriefDesc}
onChange={(e) => setNewBriefDesc(e.target.value)}
className="w-full h-20 px-4 py-3 border border-border-subtle rounded-xl bg-bg-elevated text-text-primary resize-none focus:outline-none focus:ring-2 focus:ring-accent-indigo"
placeholder="输入 Brief 描述..." placeholder="输入 Brief 描述..."
/> />
</div> </div>
{/* 上传 PDF */} {/* 选择平台规则库 */}
<div> <div>
<label className="block text-sm font-medium text-gray-700 mb-2"> <label className="block text-sm font-medium text-text-primary mb-2">
Brief <span className="text-accent-coral">*</span>
</label> </label>
<div className="border-2 border-dashed rounded-lg p-6 text-center hover:border-blue-400 transition-colors cursor-pointer"> <p className="text-xs text-text-tertiary mb-3"></p>
<Upload size={32} className="mx-auto text-gray-400 mb-2" /> <div className="grid grid-cols-2 md:grid-cols-3 gap-3">
<p className="text-sm text-gray-600"> PDF </p> {platformOptions.map((platform) => (
<p className="text-xs text-gray-400 mt-1">AI </p> <button
key={platform.id}
type="button"
onClick={() => togglePlatform(platform.id)}
className={`p-3 rounded-xl border-2 transition-all flex items-center gap-3 ${
selectedPlatforms.includes(platform.id)
? 'border-accent-indigo bg-accent-indigo/10'
: 'border-border-subtle hover:border-accent-indigo/50'
}`}
>
<div className={`w-10 h-10 ${platform.color} rounded-lg flex items-center justify-center text-lg`}>
{platform.icon}
</div>
<div className="flex-1 text-left">
<p className="font-medium text-text-primary">{platform.name}</p>
</div>
{selectedPlatforms.includes(platform.id) && (
<div className="w-5 h-5 rounded-full bg-accent-indigo flex items-center justify-center">
<Check size={12} className="text-white" />
</div>
)}
</button>
))}
</div> </div>
</div> </div>
<div className="flex gap-3 justify-end pt-4"> {/* 上传 PDF */}
<Button variant="ghost" onClick={() => setShowCreateModal(false)}> <div>
<label className="block text-sm font-medium text-text-primary mb-2">
Brief
</label>
<div className="border-2 border-dashed border-border-subtle rounded-xl p-6 text-center hover:border-accent-indigo transition-colors cursor-pointer">
<Upload size={32} className="mx-auto text-text-tertiary mb-2" />
<p className="text-sm text-text-primary"> PDF </p>
<p className="text-xs text-text-tertiary mt-1">AI </p>
</div>
</div>
<div className="flex gap-3 justify-end pt-4 border-t border-border-subtle">
<Button
variant="ghost"
onClick={() => {
setShowCreateModal(false)
setNewBriefName('')
setNewBriefDesc('')
setSelectedPlatforms([])
}}
>
</Button> </Button>
<Button onClick={() => setShowCreateModal(false)}> <Button
onClick={handleCreateBrief}
disabled={!newBriefName.trim() || selectedPlatforms.length === 0}
>
Brief
</Button> </Button>
</div> </div>
</div> </div>
</Modal> </Modal>
{/* Brief 详情弹窗 */}
<Modal
isOpen={showDetailModal}
onClose={() => {
setShowDetailModal(false)
setSelectedBrief(null)
}}
title={selectedBrief?.name || 'Brief 详情'}
size="lg"
>
{selectedBrief && (
<div className="space-y-5">
<div className="flex items-center gap-4 p-4 rounded-xl bg-bg-elevated">
<div className="p-3 bg-accent-indigo/15 rounded-xl">
<FileText size={28} className="text-accent-indigo" />
</div>
<div className="flex-1">
<h3 className="text-lg font-semibold text-text-primary">{selectedBrief.name}</h3>
<p className="text-sm text-text-tertiary mt-0.5">{selectedBrief.description}</p>
</div>
{selectedBrief.status === 'active' ? (
<SuccessTag>使</SuccessTag>
) : (
<PendingTag></PendingTag>
)}
</div>
{/* 应用的平台规则库 */}
<div>
<h4 className="text-sm font-medium text-text-primary mb-3"></h4>
<div className="grid grid-cols-2 gap-3">
{selectedBrief.platforms.map(platformId => {
const platform = getPlatformInfo(platformId)
return platform ? (
<div
key={platformId}
className="p-3 rounded-xl bg-bg-elevated border border-border-subtle flex items-center gap-3"
>
<div className={`w-10 h-10 ${platform.color} rounded-lg flex items-center justify-center text-lg`}>
{platform.icon}
</div>
<div>
<p className="font-medium text-text-primary">{platform.name}</p>
<p className="text-xs text-text-tertiary"></p>
</div>
</div>
) : null
})}
</div>
</div>
{/* 统计数据 */}
<div className="grid grid-cols-3 gap-4">
<div className="p-4 rounded-xl bg-accent-indigo/10 border border-accent-indigo/20 text-center">
<p className="text-2xl font-bold text-accent-indigo">{selectedBrief.rulesCount}</p>
<p className="text-sm text-text-secondary mt-1"></p>
</div>
<div className="p-4 rounded-xl bg-accent-green/10 border border-accent-green/20 text-center">
<p className="text-2xl font-bold text-accent-green">{selectedBrief.creatorsCount}</p>
<p className="text-sm text-text-secondary mt-1"></p>
</div>
<div className="p-4 rounded-xl bg-accent-amber/10 border border-accent-amber/20 text-center">
<p className="text-2xl font-bold text-accent-amber">{selectedBrief.platforms.length}</p>
<p className="text-sm text-text-secondary mt-1"></p>
</div>
</div>
{/* 时间信息 */}
<div className="flex items-center justify-between p-4 rounded-xl bg-bg-elevated text-sm">
<div>
<span className="text-text-tertiary"></span>
<span className="text-text-primary">{selectedBrief.createdAt}</span>
</div>
<div>
<span className="text-text-tertiary"></span>
<span className="text-text-primary">{selectedBrief.updatedAt}</span>
</div>
</div>
<div className="flex gap-3 justify-end pt-4 border-t border-border-subtle">
<Button variant="ghost" onClick={() => setShowDetailModal(false)}>
</Button>
<Button>
Brief
</Button>
</div>
</div>
)}
</Modal>
</div> </div>
) )
} }

View File

@ -4,6 +4,7 @@ import { useState } from 'react'
import { useRouter } from 'next/navigation' import { useRouter } from 'next/navigation'
import { ArrowLeft, Check, X, CheckSquare, Video, Clock } from 'lucide-react' import { ArrowLeft, Check, X, CheckSquare, Video, Clock } from 'lucide-react'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟待审核内容列表 // 模拟待审核内容列表
const mockReviewItems = [ const mockReviewItems = [
@ -12,6 +13,7 @@ const mockReviewItems = [
title: '春季护肤新品体验分享', title: '春季护肤新品体验分享',
creator: '小美', creator: '小美',
agency: '代理商A', agency: '代理商A',
platform: 'douyin',
reviewer: '张三', reviewer: '张三',
reviewTime: '2小时前', reviewTime: '2小时前',
agencyOpinion: '内容符合Brief要求卖点覆盖完整建议通过。', agencyOpinion: '内容符合Brief要求卖点覆盖完整建议通过。',
@ -29,6 +31,7 @@ const mockReviewItems = [
title: '夏日清爽护肤推荐', title: '夏日清爽护肤推荐',
creator: '小红', creator: '小红',
agency: '代理商B', agency: '代理商B',
platform: 'xiaohongshu',
reviewer: '李四', reviewer: '李四',
reviewTime: '5小时前', reviewTime: '5小时前',
agencyOpinion: '内容质量良好,但部分镜头略暗,建议后期调整后通过。', agencyOpinion: '内容质量良好,但部分镜头略暗,建议后期调整后通过。',
@ -99,6 +102,7 @@ export default function FinalReviewPage() {
const [selectedItem, setSelectedItem] = useState(mockReviewItems[0]) const [selectedItem, setSelectedItem] = useState(mockReviewItems[0])
const [feedback, setFeedback] = useState('') const [feedback, setFeedback] = useState('')
const [isSubmitting, setIsSubmitting] = useState(false) const [isSubmitting, setIsSubmitting] = useState(false)
const platform = getPlatformInfo(selectedItem.platform)
const handleApprove = async () => { const handleApprove = async () => {
setIsSubmitting(true) setIsSubmitting(true)
@ -122,11 +126,19 @@ export default function FinalReviewPage() {
} }
return ( return (
<div className="flex flex-col gap-6 h-full"> <div className="flex flex-col gap-6 h-full min-h-0">
{/* 顶部栏 */} {/* 顶部栏 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="flex flex-col gap-1"> <div className="flex flex-col gap-1">
<div className="flex items-center gap-3">
<h1 className="text-2xl font-bold text-text-primary"></h1> <h1 className="text-2xl font-bold text-text-primary"></h1>
{platform && (
<span className={`inline-flex items-center gap-1.5 px-3 py-1 rounded-lg text-sm font-medium ${platform.bgColor} ${platform.textColor} border ${platform.borderColor}`}>
<span>{platform.icon}</span>
{platform.name}
</span>
)}
</div>
<p className="text-sm text-text-secondary"> <p className="text-sm text-text-secondary">
{selectedItem.title} · : {selectedItem.creator} {selectedItem.title} · : {selectedItem.creator}
</p> </p>
@ -167,7 +179,7 @@ export default function FinalReviewPage() {
</div> </div>
{/* 右侧 - 分析面板 */} {/* 右侧 - 分析面板 */}
<div className="w-[380px] flex flex-col gap-4 overflow-auto"> <div className="w-[380px] flex flex-col gap-4 overflow-y-auto overflow-x-hidden">
{/* 代理商初审意见 */} {/* 代理商初审意见 */}
<div className="bg-bg-card rounded-2xl p-5 card-shadow"> <div className="bg-bg-card rounded-2xl p-5 card-shadow">
<div className="flex items-center justify-between mb-3"> <div className="flex items-center justify-between mb-3">

View File

@ -19,11 +19,22 @@ import {
Pencil Pencil
} from 'lucide-react' } from 'lucide-react'
// 平台选项 - 抖音用青色(品牌渐变色之一),深色主题下更清晰
const platformOptions = [
{ id: 'douyin', name: '抖音', icon: '🎵', bgColor: 'bg-[#25F4EE]/15', textColor: 'text-[#25F4EE]', borderColor: 'border-[#25F4EE]/30' },
{ id: 'xiaohongshu', name: '小红书', icon: '📕', bgColor: 'bg-[#fe2c55]/15', textColor: 'text-[#fe2c55]', borderColor: 'border-[#fe2c55]/30' },
{ id: 'bilibili', name: 'B站', icon: '📺', bgColor: 'bg-[#00a1d6]/15', textColor: 'text-[#00a1d6]', borderColor: 'border-[#00a1d6]/30' },
{ id: 'kuaishou', name: '快手', icon: '⚡', bgColor: 'bg-[#ff4906]/15', textColor: 'text-[#ff4906]', borderColor: 'border-[#ff4906]/30' },
{ id: 'weibo', name: '微博', icon: '🔴', bgColor: 'bg-[#e6162d]/15', textColor: 'text-[#e6162d]', borderColor: 'border-[#e6162d]/30' },
{ id: 'wechat', name: '微信视频号', icon: '💬', bgColor: 'bg-[#07c160]/15', textColor: 'text-[#07c160]', borderColor: 'border-[#07c160]/30' },
]
// 项目类型定义 // 项目类型定义
interface Project { interface Project {
id: string id: string
name: string name: string
status: string status: string
platform: string
deadline: string deadline: string
scriptCount: { total: number; passed: number; pending: number; rejected: number } scriptCount: { total: number; passed: number; pending: number; rejected: number }
videoCount: { total: number; passed: number; pending: number; rejected: number } videoCount: { total: number; passed: number; pending: number; rejected: number }
@ -37,6 +48,7 @@ const initialProjects: Project[] = [
id: 'proj-001', id: 'proj-001',
name: 'XX品牌618推广', name: 'XX品牌618推广',
status: 'active', status: 'active',
platform: 'douyin',
deadline: '2026-06-18', deadline: '2026-06-18',
scriptCount: { total: 20, passed: 15, pending: 3, rejected: 2 }, scriptCount: { total: 20, passed: 15, pending: 3, rejected: 2 },
videoCount: { total: 20, passed: 12, pending: 5, rejected: 3 }, videoCount: { total: 20, passed: 12, pending: 5, rejected: 3 },
@ -47,6 +59,7 @@ const initialProjects: Project[] = [
id: 'proj-002', id: 'proj-002',
name: '新品口红系列', name: '新品口红系列',
status: 'active', status: 'active',
platform: 'xiaohongshu',
deadline: '2026-03-15', deadline: '2026-03-15',
scriptCount: { total: 12, passed: 10, pending: 1, rejected: 1 }, scriptCount: { total: 12, passed: 10, pending: 1, rejected: 1 },
videoCount: { total: 12, passed: 8, pending: 3, rejected: 1 }, videoCount: { total: 12, passed: 8, pending: 3, rejected: 1 },
@ -57,14 +70,31 @@ const initialProjects: Project[] = [
id: 'proj-003', id: 'proj-003',
name: '护肤品秋季活动', name: '护肤品秋季活动',
status: 'completed', status: 'completed',
platform: 'bilibili',
deadline: '2025-11-30', deadline: '2025-11-30',
scriptCount: { total: 15, passed: 15, pending: 0, rejected: 0 }, scriptCount: { total: 15, passed: 15, pending: 0, rejected: 0 },
videoCount: { total: 15, passed: 15, pending: 0, rejected: 0 }, videoCount: { total: 15, passed: 15, pending: 0, rejected: 0 },
agencyCount: 2, agencyCount: 2,
creatorCount: 10, creatorCount: 10,
}, },
{
id: 'proj-004',
name: '双11预热活动',
status: 'active',
platform: 'kuaishou',
deadline: '2026-11-11',
scriptCount: { total: 18, passed: 8, pending: 6, rejected: 4 },
videoCount: { total: 18, passed: 5, pending: 10, rejected: 3 },
agencyCount: 4,
creatorCount: 20,
},
] ]
// 获取平台信息
function getPlatformInfo(platformId: string) {
return platformOptions.find(p => p.id === platformId)
}
function StatusTag({ status }: { status: string }) { function StatusTag({ status }: { status: string }) {
if (status === 'active') return <SuccessTag></SuccessTag> if (status === 'active') return <SuccessTag></SuccessTag>
if (status === 'completed') return <PendingTag></PendingTag> if (status === 'completed') return <PendingTag></PendingTag>
@ -74,15 +104,25 @@ function StatusTag({ status }: { status: string }) {
function ProjectCard({ project, onEditDeadline }: { project: Project; onEditDeadline: (project: Project) => void }) { function ProjectCard({ project, onEditDeadline }: { project: Project; onEditDeadline: (project: Project) => void }) {
const scriptProgress = Math.round((project.scriptCount.passed / project.scriptCount.total) * 100) const scriptProgress = Math.round((project.scriptCount.passed / project.scriptCount.total) * 100)
const videoProgress = Math.round((project.videoCount.passed / project.videoCount.total) * 100) const videoProgress = Math.round((project.videoCount.passed / project.videoCount.total) * 100)
const platform = getPlatformInfo(project.platform)
return ( return (
<Link href={`/brand/projects/${project.id}`}> <Link href={`/brand/projects/${project.id}`}>
<Card className="hover:border-accent-indigo/50 transition-colors cursor-pointer h-full"> <Card className="hover:border-accent-indigo/50 transition-colors cursor-pointer h-full overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-6 py-2 ${platform.bgColor} border-b ${platform.borderColor} flex items-center justify-between`}>
<div className="flex items-center gap-2">
<span className="text-base">{platform.icon}</span>
<span className={`text-sm font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
<StatusTag status={project.status} />
</div>
)}
<CardContent className="p-6 space-y-4"> <CardContent className="p-6 space-y-4">
{/* 项目头部 */} {/* 项目头部 */}
<div className="flex items-start justify-between">
<div> <div>
<h3 className="text-lg font-semibold text-text-primary">{project.name}</h3> <h3 className="text-lg font-semibold text-text-primary truncate">{project.name}</h3>
<div className="flex items-center gap-2 mt-1 text-sm text-text-secondary"> <div className="flex items-center gap-2 mt-1 text-sm text-text-secondary">
<Calendar size={14} /> <Calendar size={14} />
<span> {project.deadline}</span> <span> {project.deadline}</span>
@ -100,8 +140,6 @@ function ProjectCard({ project, onEditDeadline }: { project: Project; onEditDead
</button> </button>
</div> </div>
</div> </div>
<StatusTag status={project.status} />
</div>
{/* 脚本进度 */} {/* 脚本进度 */}
<div> <div>
@ -171,6 +209,7 @@ function ProjectCard({ project, onEditDeadline }: { project: Project; onEditDead
export default function BrandProjectsPage() { export default function BrandProjectsPage() {
const [searchQuery, setSearchQuery] = useState('') const [searchQuery, setSearchQuery] = useState('')
const [statusFilter, setStatusFilter] = useState<string>('all') const [statusFilter, setStatusFilter] = useState<string>('all')
const [platformFilter, setPlatformFilter] = useState<string>('all')
const [projects, setProjects] = useState<Project[]>(initialProjects) const [projects, setProjects] = useState<Project[]>(initialProjects)
// 编辑截止日期相关状态 // 编辑截止日期相关状态
@ -200,7 +239,8 @@ export default function BrandProjectsPage() {
const filteredProjects = projects.filter(project => { const filteredProjects = projects.filter(project => {
const matchesSearch = project.name.toLowerCase().includes(searchQuery.toLowerCase()) const matchesSearch = project.name.toLowerCase().includes(searchQuery.toLowerCase())
const matchesStatus = statusFilter === 'all' || project.status === statusFilter const matchesStatus = statusFilter === 'all' || project.status === statusFilter
return matchesSearch && matchesStatus const matchesPlatform = platformFilter === 'all' || project.platform === platformFilter
return matchesSearch && matchesStatus && matchesPlatform
}) })
return ( return (
@ -220,7 +260,7 @@ export default function BrandProjectsPage() {
</div> </div>
{/* 搜索和筛选 */} {/* 搜索和筛选 */}
<div className="flex items-center gap-4"> <div className="flex items-center gap-4 flex-wrap">
<div className="relative flex-1 max-w-md"> <div className="relative flex-1 max-w-md">
<Search size={18} className="absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary" /> <Search size={18} className="absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary" />
<input <input
@ -233,6 +273,16 @@ export default function BrandProjectsPage() {
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Filter size={16} className="text-text-tertiary" /> <Filter size={16} className="text-text-tertiary" />
<select
value={platformFilter}
onChange={(e) => setPlatformFilter(e.target.value)}
className="px-3 py-2 border border-border-subtle rounded-lg bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo"
>
<option value="all"></option>
{platformOptions.map(p => (
<option key={p.id} value={p.id}>{p.icon} {p.name}</option>
))}
</select>
<select <select
value={statusFilter} value={statusFilter}
onChange={(e) => setStatusFilter(e.target.value)} onChange={(e) => setStatusFilter(e.target.value)}
@ -246,6 +296,36 @@ export default function BrandProjectsPage() {
</div> </div>
</div> </div>
{/* 平台快捷筛选 */}
<div className="flex items-center gap-2 flex-wrap">
<button
type="button"
onClick={() => setPlatformFilter('all')}
className={`px-4 py-2 rounded-xl text-sm font-medium transition-all ${
platformFilter === 'all'
? 'bg-accent-indigo text-white shadow-sm'
: 'bg-bg-elevated text-text-secondary hover:bg-bg-card border border-transparent hover:border-border-subtle'
}`}
>
</button>
{platformOptions.map(platform => (
<button
key={platform.id}
type="button"
onClick={() => setPlatformFilter(platform.id)}
className={`px-4 py-2 rounded-xl text-sm font-medium transition-all flex items-center gap-2 border ${
platformFilter === platform.id
? `${platform.bgColor} ${platform.textColor} ${platform.borderColor} shadow-sm`
: 'bg-bg-elevated text-text-secondary border-transparent hover:bg-bg-card hover:border-border-subtle'
}`}
>
<span className="text-base">{platform.icon}</span>
{platform.name}
</button>
))}
</div>
{/* 项目卡片网格 */} {/* 项目卡片网格 */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{filteredProjects.map((project) => ( {filteredProjects.map((project) => (

View File

@ -27,11 +27,13 @@ import {
Check, Check,
Pencil Pencil
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟项目详情数据 // 模拟项目详情数据
const mockProject = { const mockProject = {
id: 'proj-001', id: 'proj-001',
name: 'XX品牌618推广', name: 'XX品牌618推广',
platform: 'douyin',
status: 'active', status: 'active',
deadline: '2026-06-18', deadline: '2026-06-18',
createdAt: '2026-02-01', createdAt: '2026-02-01',
@ -177,6 +179,8 @@ export default function ProjectDetailPage() {
setAgencyToDelete(null) setAgencyToDelete(null)
} }
const platform = getPlatformInfo(project.platform)
return ( return (
<div className="space-y-6"> <div className="space-y-6">
{/* 顶部导航 */} {/* 顶部导航 */}
@ -185,7 +189,15 @@ export default function ProjectDetailPage() {
<ArrowLeft size={20} className="text-text-primary" /> <ArrowLeft size={20} className="text-text-primary" />
</button> </button>
<div className="flex-1"> <div className="flex-1">
<div className="flex items-center gap-3">
<h1 className="text-2xl font-bold text-text-primary">{project.name}</h1> <h1 className="text-2xl font-bold text-text-primary">{project.name}</h1>
{platform && (
<span className={`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium ${platform.bgColor} ${platform.textColor} border ${platform.borderColor}`}>
<span>{platform.icon}</span>
{platform.name}
</span>
)}
</div>
<p className="text-sm text-text-secondary">{project.description}</p> <p className="text-sm text-text-secondary">{project.description}</p>
</div> </div>
<SuccessTag></SuccessTag> <SuccessTag></SuccessTag>

View File

@ -14,9 +14,20 @@ import {
X, X,
Users, Users,
Search, Search,
Building2 Building2,
Check
} from 'lucide-react' } from 'lucide-react'
// 平台选项
const platformOptions = [
{ id: 'douyin', name: '抖音', icon: '🎵', color: 'bg-[#1a1a1a]' },
{ id: 'xiaohongshu', name: '小红书', icon: '📕', color: 'bg-[#fe2c55]' },
{ id: 'bilibili', name: 'B站', icon: '📺', color: 'bg-[#00a1d6]' },
{ id: 'kuaishou', name: '快手', icon: '⚡', color: 'bg-[#ff4906]' },
{ id: 'weibo', name: '微博', icon: '🔴', color: 'bg-[#e6162d]' },
{ id: 'wechat', name: '微信视频号', icon: '💬', color: 'bg-[#07c160]' },
]
// 模拟品牌方已添加的代理商(来自代理商管理) // 模拟品牌方已添加的代理商(来自代理商管理)
const mockAgencies = [ const mockAgencies = [
{ id: 'AG789012', name: '星耀传媒', companyName: '上海星耀文化传媒有限公司', creatorCount: 50, passRate: 92 }, { id: 'AG789012', name: '星耀传媒', companyName: '上海星耀文化传媒有限公司', creatorCount: 50, passRate: 92 },
@ -33,6 +44,7 @@ export default function CreateProjectPage() {
const [deadline, setDeadline] = useState('') const [deadline, setDeadline] = useState('')
const [briefFile, setBriefFile] = useState<File | null>(null) const [briefFile, setBriefFile] = useState<File | null>(null)
const [selectedAgencies, setSelectedAgencies] = useState<string[]>([]) const [selectedAgencies, setSelectedAgencies] = useState<string[]>([])
const [selectedPlatform, setSelectedPlatform] = useState<string>('')
const [isSubmitting, setIsSubmitting] = useState(false) const [isSubmitting, setIsSubmitting] = useState(false)
const [agencySearch, setAgencySearch] = useState('') const [agencySearch, setAgencySearch] = useState('')
@ -60,7 +72,7 @@ export default function CreateProjectPage() {
} }
const handleSubmit = async () => { const handleSubmit = async () => {
if (!projectName.trim() || !deadline || !briefFile || selectedAgencies.length === 0) { if (!projectName.trim() || !deadline || !briefFile || selectedAgencies.length === 0 || !selectedPlatform) {
alert('请填写完整信息') alert('请填写完整信息')
return return
} }
@ -72,7 +84,7 @@ export default function CreateProjectPage() {
router.push('/brand') router.push('/brand')
} }
const isValid = projectName.trim() && deadline && briefFile && selectedAgencies.length > 0 const isValid = projectName.trim() && deadline && briefFile && selectedAgencies.length > 0 && selectedPlatform
return ( return (
<div className="space-y-6 max-w-4xl"> <div className="space-y-6 max-w-4xl">
@ -100,6 +112,38 @@ export default function CreateProjectPage() {
/> />
</div> </div>
{/* 选择平台 */}
<div>
<label className="block text-sm font-medium text-text-primary mb-2">
<span className="text-accent-coral">*</span>
</label>
<p className="text-xs text-text-tertiary mb-3"></p>
<div className="grid grid-cols-3 md:grid-cols-6 gap-3">
{platformOptions.map((platform) => (
<button
key={platform.id}
type="button"
onClick={() => setSelectedPlatform(platform.id)}
className={`p-3 rounded-xl border-2 transition-all flex flex-col items-center gap-2 ${
selectedPlatform === platform.id
? 'border-accent-indigo bg-accent-indigo/10'
: 'border-border-subtle hover:border-accent-indigo/50'
}`}
>
<div className={`w-10 h-10 ${platform.color} rounded-lg flex items-center justify-center text-lg`}>
{platform.icon}
</div>
<span className="text-sm font-medium text-text-primary">{platform.name}</span>
{selectedPlatform === platform.id && (
<div className="absolute top-1 right-1 w-4 h-4 rounded-full bg-accent-indigo flex items-center justify-center">
<Check size={10} className="text-white" />
</div>
)}
</button>
))}
</div>
</div>
{/* 截止日期 */} {/* 截止日期 */}
<div> <div>
<label className="block text-sm font-medium text-text-primary mb-2"> <label className="block text-sm font-medium text-text-primary mb-2">

View File

@ -16,6 +16,7 @@ import {
ChevronRight, ChevronRight,
AlertTriangle AlertTriangle
} from 'lucide-react' } from 'lucide-react'
import { getPlatformInfo } from '@/lib/platforms'
// 模拟脚本待审列表 // 模拟脚本待审列表
const mockScriptTasks = [ const mockScriptTasks = [
@ -25,6 +26,7 @@ const mockScriptTasks = [
creatorName: '小美护肤', creatorName: '小美护肤',
agencyName: '星耀传媒', agencyName: '星耀传媒',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'douyin',
aiScore: 88, aiScore: 88,
submittedAt: '2026-02-06 14:30', submittedAt: '2026-02-06 14:30',
hasHighRisk: false, hasHighRisk: false,
@ -36,6 +38,7 @@ const mockScriptTasks = [
creatorName: '美妆Lisa', creatorName: '美妆Lisa',
agencyName: '创意无限', agencyName: '创意无限',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'xiaohongshu',
aiScore: 72, aiScore: 72,
submittedAt: '2026-02-06 12:15', submittedAt: '2026-02-06 12:15',
hasHighRisk: true, hasHighRisk: true,
@ -51,6 +54,7 @@ const mockVideoTasks = [
creatorName: '小美护肤', creatorName: '小美护肤',
agencyName: '星耀传媒', agencyName: '星耀传媒',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'douyin',
aiScore: 85, aiScore: 85,
duration: '02:15', duration: '02:15',
submittedAt: '2026-02-06 15:00', submittedAt: '2026-02-06 15:00',
@ -63,6 +67,7 @@ const mockVideoTasks = [
creatorName: '美妆Lisa', creatorName: '美妆Lisa',
agencyName: '创意无限', agencyName: '创意无限',
projectName: 'XX品牌618推广', projectName: 'XX品牌618推广',
platform: 'xiaohongshu',
aiScore: 68, aiScore: 68,
duration: '03:42', duration: '03:42',
submittedAt: '2026-02-06 13:45', submittedAt: '2026-02-06 13:45',
@ -75,6 +80,7 @@ const mockVideoTasks = [
creatorName: '健身教练王', creatorName: '健身教练王',
agencyName: '美妆达人MCN', agencyName: '美妆达人MCN',
projectName: 'XX运动品牌', projectName: 'XX运动品牌',
platform: 'bilibili',
aiScore: 92, aiScore: 92,
duration: '04:20', duration: '04:20',
submittedAt: '2026-02-06 11:30', submittedAt: '2026-02-06 11:30',
@ -91,10 +97,19 @@ function ScoreTag({ score }: { score: number }) {
function TaskCard({ task, type }: { task: typeof mockScriptTasks[0] | typeof mockVideoTasks[0]; type: 'script' | 'video' }) { function TaskCard({ task, type }: { task: typeof mockScriptTasks[0] | typeof mockVideoTasks[0]; type: 'script' | 'video' }) {
const href = type === 'script' ? `/brand/review/script/${task.id}` : `/brand/review/video/${task.id}` const href = type === 'script' ? `/brand/review/script/${task.id}` : `/brand/review/video/${task.id}`
const platform = getPlatformInfo(task.platform)
return ( return (
<Link href={href}> <Link href={href}>
<div className="p-4 rounded-lg border border-border-subtle hover:border-accent-indigo/50 hover:bg-accent-indigo/5 transition-all cursor-pointer"> <div className="rounded-lg border border-border-subtle hover:border-accent-indigo/50 hover:bg-accent-indigo/5 transition-all cursor-pointer overflow-hidden">
{/* 平台顶部条 */}
{platform && (
<div className={`px-4 py-1.5 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-1.5`}>
<span className="text-sm">{platform.icon}</span>
<span className={`text-xs font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<div className="p-4">
<div className="flex items-start justify-between mb-3"> <div className="flex items-start justify-between mb-3">
<div className="flex-1 min-w-0"> <div className="flex-1 min-w-0">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@ -132,6 +147,7 @@ function TaskCard({ task, type }: { task: typeof mockScriptTasks[0] | typeof moc
</div> </div>
)} )}
</div> </div>
</div>
</Link> </Link>
) )
} }

File diff suppressed because it is too large Load Diff

View File

@ -156,7 +156,7 @@ export default function BrandSettingsPage() {
</div> </div>
<Button <Button
variant="secondary" variant="secondary"
className="text-accent-coral border-accent-coral/30 hover:bg-accent-coral/10" className="bg-accent-coral/15 text-accent-coral border-accent-coral hover:bg-accent-coral hover:text-white"
onClick={() => setShowLogoutModal(true)} onClick={() => setShowLogoutModal(true)}
> >
<LogOut size={16} /> <LogOut size={16} />

View File

@ -17,6 +17,7 @@ import {
} from 'lucide-react' } from 'lucide-react'
import { ResponsiveLayout } from '@/components/layout/ResponsiveLayout' import { ResponsiveLayout } from '@/components/layout/ResponsiveLayout'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { platformOptions, getPlatformInfo } from '@/lib/platforms'
// 任务阶段状态类型 // 任务阶段状态类型
type StageStatus = 'pending' | 'current' | 'done' | 'error' type StageStatus = 'pending' | 'current' | 'done' | 'error'
@ -26,6 +27,7 @@ type Task = {
id: string id: string
title: string title: string
description: string description: string
platform: string // 发布平台
// 脚本阶段 // 脚本阶段
scriptStage: { scriptStage: {
submit: StageStatus submit: StageStatus
@ -54,6 +56,7 @@ const mockTasks: Task[] = [
id: 'task-001', id: 'task-001',
title: 'XX品牌618推广', title: 'XX品牌618推广',
description: '产品种草视频 · 时长要求 60-90秒 · 截止: 2026-02-10', description: '产品种草视频 · 时长要求 60-90秒 · 截止: 2026-02-10',
platform: 'douyin',
scriptStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' }, scriptStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '上传脚本', buttonText: '上传脚本',
@ -65,6 +68,7 @@ const mockTasks: Task[] = [
id: 'task-002', id: 'task-002',
title: 'YY美妆新品', title: 'YY美妆新品',
description: '口播测评 · 已上传视频 · 提交于: 今天 14:30', description: '口播测评 · 已上传视频 · 提交于: 今天 14:30',
platform: 'xiaohongshu',
scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -76,6 +80,7 @@ const mockTasks: Task[] = [
id: 'task-003', id: 'task-003',
title: 'ZZ饮品夏日', title: 'ZZ饮品夏日',
description: '探店Vlog · 发现2处问题 · 需修改后重新提交', description: '探店Vlog · 发现2处问题 · 需修改后重新提交',
platform: 'bilibili',
scriptStage: { submit: 'done', ai: 'error', agency: 'pending', brand: 'pending' }, scriptStage: { submit: 'done', ai: 'error', agency: 'pending', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看修改', buttonText: '查看修改',
@ -87,6 +92,7 @@ const mockTasks: Task[] = [
id: 'task-004', id: 'task-004',
title: 'AA数码新品发布', title: 'AA数码新品发布',
description: '开箱测评 · 审核通过 · 可发布', description: '开箱测评 · 审核通过 · 可发布',
platform: 'douyin',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
buttonText: '查看详情', buttonText: '查看详情',
@ -98,6 +104,7 @@ const mockTasks: Task[] = [
id: 'task-005', id: 'task-005',
title: 'BB运动饮料', title: 'BB运动饮料',
description: '运动场景 · 脚本AI审核中 · 等待结果', description: '运动场景 · 脚本AI审核中 · 等待结果',
platform: 'kuaishou',
scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -109,6 +116,7 @@ const mockTasks: Task[] = [
id: 'task-006', id: 'task-006',
title: 'CC服装春季款', title: 'CC服装春季款',
description: '穿搭展示 · 脚本待代理商审核', description: '穿搭展示 · 脚本待代理商审核',
platform: 'xiaohongshu',
scriptStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' }, scriptStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -120,6 +128,7 @@ const mockTasks: Task[] = [
id: 'task-007', id: 'task-007',
title: 'DD家电测评', title: 'DD家电测评',
description: '开箱视频 · 脚本待品牌终审', description: '开箱视频 · 脚本待品牌终审',
platform: 'bilibili',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -131,6 +140,7 @@ const mockTasks: Task[] = [
id: 'task-008', id: 'task-008',
title: 'EE食品试吃', title: 'EE食品试吃',
description: '美食测评 · 脚本通过 · 待上传视频', description: '美食测评 · 脚本通过 · 待上传视频',
platform: 'douyin',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '上传视频', buttonText: '上传视频',
@ -142,6 +152,7 @@ const mockTasks: Task[] = [
id: 'task-009', id: 'task-009',
title: 'FF护肤品', title: 'FF护肤品',
description: '使用教程 · 视频AI审核中', description: '使用教程 · 视频AI审核中',
platform: 'xiaohongshu',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -153,6 +164,7 @@ const mockTasks: Task[] = [
id: 'task-010', id: 'task-010',
title: 'GG智能手表', title: 'GG智能手表',
description: '功能展示 · 脚本代理商不通过', description: '功能展示 · 脚本代理商不通过',
platform: 'weibo',
scriptStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' }, scriptStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看修改', buttonText: '查看修改',
@ -164,6 +176,7 @@ const mockTasks: Task[] = [
id: 'task-011', id: 'task-011',
title: 'HH美妆代言', title: 'HH美妆代言',
description: '品牌代言 · 脚本品牌不通过', description: '品牌代言 · 脚本品牌不通过',
platform: 'xiaohongshu',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' },
videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' },
buttonText: '查看修改', buttonText: '查看修改',
@ -175,6 +188,7 @@ const mockTasks: Task[] = [
id: 'task-012', id: 'task-012',
title: 'II数码配件', title: 'II数码配件',
description: '配件展示 · 视频代理商审核中', description: '配件展示 · 视频代理商审核中',
platform: 'bilibili',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' }, videoStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' },
buttonText: '查看详情', buttonText: '查看详情',
@ -186,6 +200,7 @@ const mockTasks: Task[] = [
id: 'task-013', id: 'task-013',
title: 'JJ旅行vlog', title: 'JJ旅行vlog',
description: '旅行记录 · 视频代理商不通过', description: '旅行记录 · 视频代理商不通过',
platform: 'wechat',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' }, videoStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' },
buttonText: '查看修改', buttonText: '查看修改',
@ -197,6 +212,7 @@ const mockTasks: Task[] = [
id: 'task-014', id: 'task-014',
title: 'KK宠物用品', title: 'KK宠物用品',
description: '宠物日常 · 视频品牌终审中', description: '宠物日常 · 视频品牌终审中',
platform: 'douyin',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' },
buttonText: '查看详情', buttonText: '查看详情',
@ -208,6 +224,7 @@ const mockTasks: Task[] = [
id: 'task-015', id: 'task-015',
title: 'LL厨房电器', title: 'LL厨房电器',
description: '使用演示 · 视频品牌不通过', description: '使用演示 · 视频品牌不通过',
platform: 'kuaishou',
scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' },
videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' },
buttonText: '查看修改', buttonText: '查看修改',
@ -297,6 +314,8 @@ function ProgressBar({ stage, color }: {
// 任务卡片组件 // 任务卡片组件
function TaskCard({ task, onClick }: { task: Task; onClick: () => void }) { function TaskCard({ task, onClick }: { task: Task; onClick: () => void }) {
const platform = getPlatformInfo(task.platform)
const getStageColor = (color: string) => { const getStageColor = (color: string) => {
switch (color) { switch (color) {
case 'blue': return 'text-accent-blue' case 'blue': return 'text-accent-blue'
@ -320,9 +339,18 @@ function TaskCard({ task, onClick }: { task: Task; onClick: () => void }) {
return ( return (
<div <div
className="bg-bg-card rounded-2xl p-5 flex flex-col gap-4 card-shadow cursor-pointer hover:bg-bg-elevated/30 transition-colors" className="bg-bg-card rounded-2xl overflow-hidden card-shadow cursor-pointer hover:bg-bg-elevated/30 transition-colors"
onClick={onClick} onClick={onClick}
> >
{/* 平台顶部条 */}
{platform && (
<div className={`px-5 py-2 ${platform.bgColor} border-b ${platform.borderColor} flex items-center gap-2`}>
<span className="text-base">{platform.icon}</span>
<span className={`text-sm font-medium ${platform.textColor}`}>{platform.name}</span>
</div>
)}
<div className="p-5 flex flex-col gap-4">
{/* 任务主行 */} {/* 任务主行 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
{/* 左侧:缩略图 + 信息 */} {/* 左侧:缩略图 + 信息 */}
@ -364,6 +392,7 @@ function TaskCard({ task, onClick }: { task: Task; onClick: () => void }) {
</div> </div>
</div> </div>
</div> </div>
</div>
) )
} }

View File

@ -14,10 +14,12 @@ export function DesktopLayout({
className = '', className = '',
}: DesktopLayoutProps) { }: DesktopLayoutProps) {
return ( return (
<div className={`min-h-screen bg-bg-page flex ${className}`}> <div className={`h-screen bg-bg-page flex overflow-hidden ${className}`}>
<Sidebar role={role} /> <Sidebar role={role} />
<main className="flex-1 ml-[260px] p-8 overflow-auto"> <main className="flex-1 ml-[260px] p-8 overflow-y-auto overflow-x-hidden">
<div className="min-h-full">
{children} {children}
</div>
</main> </main>
</div> </div>
) )

View File

@ -19,10 +19,12 @@ export function MobileLayout({
className = '', className = '',
}: MobileLayoutProps) { }: MobileLayoutProps) {
return ( return (
<div className={`min-h-screen bg-bg-page flex flex-col overflow-x-hidden ${className}`}> <div className={`h-screen bg-bg-page flex flex-col overflow-hidden ${className}`}>
{showStatusBar && <StatusBar />} {showStatusBar && <StatusBar />}
<main className={`flex-1 ${showBottomNav ? 'pb-[95px]' : ''}`}> <main className={`flex-1 overflow-y-auto overflow-x-hidden ${showBottomNav ? 'pb-[80px]' : ''}`}>
<div className="min-h-full">
{children} {children}
</div>
</main> </main>
{showBottomNav && <BottomNav role={role} />} {showBottomNav && <BottomNav role={role} />}
</div> </div>

View File

@ -37,7 +37,7 @@ export function ResponsiveLayout({
const closeSidebar = () => setSidebarOpen(false) const closeSidebar = () => setSidebarOpen(false)
return ( return (
<div className={cn('min-h-screen bg-bg-page', className)}> <div className={cn('h-screen bg-bg-page overflow-hidden', className)}>
{/* 移动端:汉堡菜单按钮 */} {/* 移动端:汉堡菜单按钮 */}
{isMobile && !sidebarOpen && ( {isMobile && !sidebarOpen && (
<button <button
@ -84,11 +84,13 @@ export function ResponsiveLayout({
{/* 主内容区 */} {/* 主内容区 */}
<main <main
className={cn( className={cn(
'min-h-screen transition-all duration-300', 'h-full overflow-y-auto overflow-x-hidden transition-all duration-300',
isMobile ? 'ml-0 pt-16 px-4 pb-6' : 'ml-[260px] p-8' isMobile ? 'ml-0 pt-16 px-4 pb-6' : 'ml-[260px] p-8'
)} )}
> >
<div className="min-h-full">
{children} {children}
</div>
</main> </main>
</div> </div>
) )

View File

@ -25,7 +25,15 @@ const sizeStyles = {
md: 'max-w-md', md: 'max-w-md',
lg: 'max-w-lg', lg: 'max-w-lg',
xl: 'max-w-xl', xl: 'max-w-xl',
full: 'max-w-[90vw] max-h-[90vh]', full: 'max-w-[90vw]',
};
const bodyMaxHeightStyles = {
sm: 'max-h-[50vh]',
md: 'max-h-[60vh]',
lg: 'max-h-[65vh]',
xl: 'max-h-[70vh]',
full: 'max-h-[75vh]',
}; };
export const Modal: React.FC<ModalProps> = ({ export const Modal: React.FC<ModalProps> = ({
@ -105,7 +113,7 @@ export const Modal: React.FC<ModalProps> = ({
)} )}
{/* Body */} {/* Body */}
<div className="px-5 py-4 max-h-[60vh] overflow-y-auto"> <div className={`px-5 py-4 overflow-y-auto ${bodyMaxHeightStyles[size]}`}>
{children} {children}
</div> </div>

22
frontend/lib/platforms.ts Normal file
View File

@ -0,0 +1,22 @@
// 平台配置 - 共享给所有端使用
export const platformOptions = [
{ id: 'douyin', name: '抖音', icon: '🎵', bgColor: 'bg-[#25F4EE]/15', textColor: 'text-[#25F4EE]', borderColor: 'border-[#25F4EE]/30' },
{ id: 'xiaohongshu', name: '小红书', icon: '📕', bgColor: 'bg-[#fe2c55]/15', textColor: 'text-[#fe2c55]', borderColor: 'border-[#fe2c55]/30' },
{ id: 'bilibili', name: 'B站', icon: '📺', bgColor: 'bg-[#00a1d6]/15', textColor: 'text-[#00a1d6]', borderColor: 'border-[#00a1d6]/30' },
{ id: 'kuaishou', name: '快手', icon: '⚡', bgColor: 'bg-[#ff4906]/15', textColor: 'text-[#ff4906]', borderColor: 'border-[#ff4906]/30' },
{ id: 'weibo', name: '微博', icon: '🔴', bgColor: 'bg-[#e6162d]/15', textColor: 'text-[#e6162d]', borderColor: 'border-[#e6162d]/30' },
{ id: 'wechat', name: '微信视频号', icon: '💬', bgColor: 'bg-[#07c160]/15', textColor: 'text-[#07c160]', borderColor: 'border-[#07c160]/30' },
]
export type PlatformId = typeof platformOptions[number]['id']
export function getPlatformInfo(platformId: string) {
return platformOptions.find(p => p.id === platformId)
}
// 平台标签组件的样式类
export function getPlatformTagClasses(platformId: string) {
const platform = getPlatformInfo(platformId)
if (!platform) return ''
return `${platform.bgColor} ${platform.textColor} ${platform.borderColor}`
}