You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
TPIContextProvider
tpi主要的state容器, 主要接口: `/tasks/${stageId}.json`, 一次性获取所有tpi首屏展示所需要的信息, 除了代码内容。
接口返回的内容包括
当前用户信息、shixun、challenge、game、测试集、vnc等等
其他接口:
`/tasks/${game.identifier}/check_test_sets.json`
解锁测试集
`/tasks/${game.identifier}/plus_or_cancel_praise.json`
给关卡点赞
`/tasks/${game.identifier}/picture_display.json`
如果评测通过,服务端返回了`data.picture`,会调用这个接口获取可视化的评测结果,类型包括
qrcode 二维码 安卓实训
image 图片
txt
html
mp3
mp4
代码内容通过以下接口获取:
`/tasks/${game.identifier}/rep_content.json?path=${path}&status=${status}&retry=${isRetry ? 1 : 0}`
层次结构
TPIContextProvider
page/Index
Header
TaskListContainer
TaskList 左侧划出的任务列表
MainContentContainer
MainContent
LeftViewContainer 左侧区域
LeftView
ChooseAnswerView 选择题答案
CommentContainer
Comments 评论列表
CodeEvaluateMultiLevelAnswerUnlock 多级别解锁
// 看设置, 是vnc or 代码 or 选择题
CodeRepositoryViewContainer for VNC
VNCContainer
CodeEvaluateView 代码评测结果
VNCDisplay vnc显示
ActionView 评测按钮区
|| CodeRepositoryViewContainer 代码显示区
WebSSHTimer ssh倒计时
TPIMonaco monaco编辑器
|| ChooseRepositoryView 选择题显示区
// 看设置,是代码 or 选择题
CodeEvaluateView
|| ChooseEvaluateView
ActionView 评测按钮区
没用的文件
LeftNav.js
AnswerListContainer.js left 他人解答