feat(自学): 自学重做——首页课程地图、读一课按项目分目录、代码块就地运行、学完给题做
Deploy / deploy (push) Canceled after 0s

- 顶栏「自学」进新的自学首页 /learn:接着学(按服务端记录,不再串到上一个学生)+ 按项目分组的课程地图
- 读一课:左边目录按项目折叠,正文加宽,右边本课大纲带练一练标记;去掉了不能运行的示例代码栏
- 正文里的代码块能改能运行,报错用题目页那套中文解释;读输入的代码出输入框
- 课末:练一练做到几道 → 学完了 → 老师挑的几道题(必会标出来)→ 下一课
- 练一练统一成绿色提交、结果一行字;手机版目录从底部弹出
- 后台:教程列表按项目分组拖动排序,编辑页左写右看、练一练插到光标处、挑相关题;
  自学情况改成方块格 + 还没打开过的名单

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-12 09:40:34 +08:00
1 parent 11194543a3
commit 845e41c060
43 files changed
+4675 -1294

No files matched your search

-1
View File
@@ -150,7 +150,6 @@ export { USER_TYPE, PROBLEM_PERMISSION } from "@oj2/contract"
export const STORAGE_KEY = {
AUTHED: "authed",
LANGUAGE: "problemLanguage",
LEARN_CURRENT_STEP: "learnStep",
ADMIN_PROBLEM: "adminProblem",
ADMIN_SQL_PROBLEM: "adminSqlProblem",
ADMIN_CODE_PROBLEM: "adminCodeProblem",
+10 -10
View File
@@ -329,10 +329,8 @@ export type {
AdminAiReportList,
StuckProblem,
AcTrend,
LearnStudentProgress,
LearnStudentProgressList,
LearnTutorialProgress,
LearnTutorialProgressList,
LearnBoard,
LearnBoardStudent,
LearnExerciseProgress,
LearnExerciseProgressList,
LearnExerciseAttempt,
@@ -390,13 +388,13 @@ import type { AdminExercise, AdminTutorial, CreateSubmissionRequest } from "@oj2
/**
* 教程编辑表单。只留可编辑字段 —— createdBy / createdAt / updatedAt 由后端产出,
* 新建时压根不存在(对齐 BlankProblem / BlankContest 的写法)。
*
* `code` 收窄成 string:读回来时统一 `?? ""`,代码编辑器的 v-model 不接受 null。
* 新建时压根不存在(对齐 BlankProblem / BlankContest 的写法)。「示例代码」字段界面上
* 去掉了(正文里的代码块能直接运行),挂的题走单独的接口。
*/
export type TutorialEdit = Omit<AdminTutorial, "createdBy" | "createdAt" | "updatedAt" | "code"> & {
code: string
}
export type TutorialEdit = Omit<
AdminTutorial,
"createdBy" | "createdAt" | "updatedAt" | "code" | "problems"
>
export interface ExerciseMcqData {
question: string
@@ -448,6 +446,8 @@ export type { ExerciseType } from "@oj2/contract"
* 前端按题型收窄成判别联合 —— 组件靠它区分七种题型的字段。
*/
export type Exercise = Omit<AdminExercise, "data"> & {
/** 学生端才有:当前学生做对过没有(后台的练习列表不下发) */
solved?: boolean
data:
| ExerciseMcqData
| ExerciseSortData