fix: 代理商平台显示 + Brief 下载预览功能
- 后端 TaskResponse.ProjectInfo 新增 platform 字段 - 修复代理商 6 个页面硬编码 platform='douyin' 的问题,改为读取实际值 - Brief 预览弹窗:占位符改为 iframe/img 实际展示文件内容 - PDF 用 iframe 在线预览 - 图片直接展示 - 其他类型提示下载 - Brief 下载:改用 a 标签触发下载 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4ca743e7b6
commit
0ab58b7e6e
@@ -8,8 +8,13 @@ import { Button } from '@/components/ui/Button'
|
||||
import { SuccessTag, WarningTag, ErrorTag, PendingTag } from '@/components/ui/Tag'
|
||||
import { api } from '@/lib/api'
|
||||
import { USE_MOCK } from '@/contexts/AuthContext'
|
||||
import { getPlatformInfo } from '@/lib/platforms'
|
||||
import type { TaskResponse, TaskStage } from '@/types/task'
|
||||
|
||||
function getPlatformLabel(platformId: string): string {
|
||||
return getPlatformInfo(platformId)?.name || platformId
|
||||
}
|
||||
|
||||
// ==================== 本地视图模型 ====================
|
||||
interface TaskViewModel {
|
||||
id: string
|
||||
@@ -225,7 +230,7 @@ function mapTaskResponseToViewModel(task: TaskResponse): TaskViewModel {
|
||||
videoTitle: task.name,
|
||||
creatorName: task.creator?.name || '未知达人',
|
||||
brandName: task.project?.brand_name || '未知品牌',
|
||||
platform: '小红书', // 后端暂无 platform 字段
|
||||
platform: task.project?.platform ? getPlatformLabel(task.project.platform) : '未知平台',
|
||||
status,
|
||||
aiScore,
|
||||
finalScore,
|
||||
|
||||
Reference in New Issue
Block a user