Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

Implementation Plan for Live Content Review System

This PR implements a complete live content review backend system with the following features:

  • Initialize React + TypeScript project structure
  • Set up project configuration (package.json, tsconfig.json, etc.)
  • Create TypeScript interfaces for data models
  • Implement API service layer
  • Build Filter Panel component with all filtering options
    • Anchor ID and Live ID text inputs
    • Multi-select dropdowns for Platform and Behavior
    • Version range inputs (X.Y.Z format)
    • Time range pickers (default 24h)
  • Create main review items display component
    • Paginated grid layout (5 images per row, 2 rows per page)
    • Lazy loading for images
    • Responsive image thumbnails (160x160px)
  • Build image detail modal
    • Full-size image display
    • Complete field information display
    • JSON formatting for params
    • External link support
  • Add pagination controls
  • Implement utility functions (version conversion, etc.)
  • Create API documentation
  • Test the complete workflow
  • Add README with setup instructions
Original prompt

实现一个直播内容审核后台系统的功能:审核数据展示与交互界面。

背景说明:
系统在直播过程中会定时抓取画面帧,生成结构化记录并存储。每条记录包含以下字段:主播ID(字符串)、直播ID(字符串)、App版本号(字符串,格式如"10.11.99")、时间戳(Unix毫秒时间戳,数字)、平台(字符串,如"iOS"、"Android"、"Web")、埋点行为(字符串,如"gift_send"、"chat")、埋点参数(字符串,可能为JSON)、追加参数(字符串,可能为JSON)、抓帧图URL(字符串,指向CDN的图片地址)、详情链接(字符串,完整URL)。这些数据已由后端服务写入数据库,你现在要构建一个审核人员使用的Web前端页面,用于高效浏览和判断内容是否合规。

功能要求:

  1. 筛选条件(Filter Panel)
    主播ID:单行文本输入,支持模糊搜索。
    直播ID:单行文本输入,支持模糊搜索。
    平台:多选下拉框,支持多选,选项可动态去重或预设常见值。
    埋点行为:多选下拉框,支持多选。
    App版本号:提供“起始版本”和“结束版本”两个输入框,格式为X.Y.Z(如10.11.99)。内部应将版本号转换为9位整数(例如10.11.99 → 101199000)进行区间比较,支持只填其中一个边界。
    时间范围:提供开始时间和结束时间选择器(基于毫秒时间戳),默认最近24小时。
    所有筛选条件通过点击“查询”按钮触发请求,不自动刷新。

  2. 数据展示(主内容区)
    使用分页布局,默认每页10条记录。
    每行展示5张抓帧图,一屏最多显示2行(共10张图)。
    图片需等比缩放以适应固定容器(例如160×160px),避免变形,建议使用object-fit: contain。
    其他字段(主播ID、直播ID、平台等)以极小字号(如10px)显示在图片下方或作为悬浮提示,不占用主要视觉空间。
    点击任意图片弹出模态框(Modal),展示:放大后的原图(保持原始比例)、所有字段的完整信息(埋点参数和追加参数若为JSON则格式化显示)、详情链接(作为超链接,点击在新标签页打开)。
    模态框支持ESC键关闭和点击遮罩关闭。

  3. 技术与体验细节
    前端建议使用React配合成熟UI库(如Ant Design或Element Plus)。
    图片加载需支持懒加载,避免首屏卡顿。
    分页控件置于底部,支持跳转页码和每页条数切换(可选10/20/50)。
    若字段为空(如埋点参数),在详情中显示为“—”或“空”。
    整体风格简洁紧凑,适配1920×1080及以上分辨率屏幕。
    所有操作在当前页面完成,不跳转新页面。

  4. 后端接口约定(供前端调用)
    请同时提供清晰的RESTful API设计草案,定义如下:
    接口路径:GET /api/review-items
    查询参数:
    anchorId(可选,字符串)
    liveId(可选,字符串)
    platforms(可选,字符串数组,如?platforms=iOS&platforms=Android)
    behaviors(可选,字符串数组)
    appVersionMin(可选,字符串,格式X.Y.Z)
    appVersionMax(可选,字符串)
    startTime(可选,数字,Unix毫秒)
    endTime(可选,数字,Unix毫秒)
    page(可选,默认1)
    pageSize(可选,默认10)
    响应结构:

{
"total": 125,
"items": [
{
"anchorId": "u12345",
"liveId": "l67890",
"appVersion": "10.11.99",
"timestamp": 1731234567890,
"platform": "iOS",
"behavior": "gift_send",
"behaviorParams": "{\"gift_id\":101}",
"extraParams": "{}",
"imageUrl": "https://cdn.example.com/frame_abc.jpg",
"detailUrl": "https://example.com/detail?liveId=l67890&ts=1731234567890"
}
]
}

输出要求:
请生成完整的前端React组件代码(含状态管理、API调用、UI渲染)、对应的TypeScript接口定义、上述RESTful API的详细文档(纯文本格式)、以及关键交互逻辑说明(如版本号转换方法、图片懒加载方案等)。优先保证审核效率与视觉清晰度。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants