Skip to content

Commit

Permalink
fix(core): 修复职教云任务获取出现子节点BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Jun 12, 2022
1 parent 97c633a commit ba63921
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/script/icve/study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ export async function loadTasks() {
// 解除加载状态
loading = false;
if (type === 'cell_html' && data.code) {
icve.study.cells = icve.study.cells.concat(data.cellList);
// 获取章节列表并且检测子节点
icve.study.cells = icve.study.cells.concat(data.cellList.map((cl: any) => cl.childNodeList || cl));
icve.study.cells = icve.study.cells.map(cell => {
// 判断进度
cell.isTask = cell.stuCellPercent !== 100;
Expand Down

0 comments on commit ba63921

Please sign in to comment.