提交 cf60f99a authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复课程详情页点击'学习按钮'可能出错的问题

上级 663e56a7
...@@ -104,6 +104,7 @@ const getCourseDetail = (id, sid, callback) => { ...@@ -104,6 +104,7 @@ const getCourseDetail = (id, sid, callback) => {
_homework.semester_id = res.data.semester_id _homework.semester_id = res.data.semester_id
} }
return { return {
type: __.type,
id: __.id, id: __.id,
cid: cur.course_id, cid: cur.course_id,
sid: cur.semester_id, sid: cur.semester_id,
......
...@@ -149,7 +149,7 @@ Page({ ...@@ -149,7 +149,7 @@ Page({
} }
for (let k = 0; k < children.length; k++) { for (let k = 0; k < children.length; k++) {
const item = children[k] const item = children[k]
if (!json.tabs1ChapterList.currentChapterId || item.vid === json.tabs1ChapterList.currentChapterId) { if (item.type === 2 && (!json.tabs1ChapterList.currentChapterId || item.vid === json.tabs1ChapterList.currentChapterId)) {
this.setData({ latestVideo: item }) this.setData({ latestVideo: item })
break break
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论