🐛 学习通刷课修复

This commit is contained in:
sugarBecomer
2025-12-09 23:36:13 +08:00
parent 58fb282fe8
commit 5f81a7ba5e
2 changed files with 1207 additions and 301 deletions
@@ -169,7 +169,7 @@ type AttachmentSetting struct {
Defaults map[string]interface{} `json:"defaults"`
}
// ChapterPoints 章节所有任务点集合
// ChapterPoints 章节所有任务点集合(旧版,保留兼容)
type ChapterPoints struct {
Videos []PointVideoDto
Documents []PointDocumentDto
@@ -178,6 +178,75 @@ type ChapterPoints struct {
Lives []PointLiveDto
}
// ChapterPointType 任务点类型枚举
type ChapterPointType int
const (
ChapterPointTypeVideo ChapterPointType = 1 // 视频
ChapterPointTypeDocument ChapterPointType = 2 // 文档
ChapterPointTypeWork ChapterPointType = 3 // 作业
ChapterPointTypeHyperlink ChapterPointType = 4 // 外链
ChapterPointTypeLive ChapterPointType = 5 // 直播
)
// ChapterPoint 统一的章节任务点结构(与Card一一对应)
type ChapterPoint struct {
CardIndex int // 对应的卡片索引
Type ChapterPointType // 任务点类型
KnowledgeID int // 知识点ID
CourseID string // 课程ID
ClassID string // 班级ID
Cpi string // cpi
JobID string // 任务ID
ObjectID string // 对象ID
Title string // 标题
IsJob bool // 是否是任务点
IsPassed bool // 是否已完成
// 视频相关字段
FID int
DToken string
PlayTime int
Duration int
OtherInfo string
RT float64
VideoFaceCaptureEnc string
RandomCaptureTime string
AttDurationEnc string
Enc string
Mid string
// 文档相关字段
Jtoken string
DocumentType string // document / insertbook
// 作业相关字段
WorkID string
SchoolID string
PUID string
KToken string
// 外链相关字段
LinkType int
// 直播相关字段
UserId string
Live bool
LiveId string
Vdoid string
StreamName string
LiveStatusStr string
LiveStatusCode int
VideoDuration int
Aid string
Module string
AuthEnc string
LiveDragEnc string
LiveSetEnc string
LiveSwDsEnc string
VideoCompletePercent float64
}
// QuestionType 题目类型
type QuestionType int
File diff suppressed because it is too large Load Diff