|
@@ -273,6 +273,7 @@ class CourseScene extends scene {
|
|
|
onResume(data) {
|
|
|
if (!data) { return }
|
|
|
if ('BuyConfirmScene' === data.backScene) {
|
|
|
+
|
|
|
if ('goBuy' === data.mode) {
|
|
|
//TODO:需降低耦合,统一管理路由,暂时先造个对象
|
|
|
this.navSwitch({ target: { id: 'course-tab-detail' } });
|
|
@@ -282,6 +283,9 @@ class CourseScene extends scene {
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ } else if ('DownloadTipScene' === data.backScene) {
|
|
|
+ return;
|
|
|
} else {
|
|
|
this.renderCourse(this.id);
|
|
|
}
|
|
@@ -337,16 +341,30 @@ class CourseScene extends scene {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // 点击某一课
|
|
|
+ // 点击正在下载的某一课
|
|
|
+ if (e.target.con.classList.contains('download-btn-lesson-list-ongoing') || e.target.con.classList.contains('download-btn-lesson-icon-ready')) {
|
|
|
+ this.showScene(require('./DownloadTipScene.js'), {});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (e.target.con.classList.contains('text-wrapper')) {
|
|
|
+ let i = 0;
|
|
|
+ for (i < e.target.parentWidget.childWidgets; i++;) {
|
|
|
+ if(e.target.parentWidget.childWidgets[i].con.classList.contains('download-btn-lesson-list-ongoing') || e.target.con.classList.contains('download-btn-lesson-icon-ready')) {
|
|
|
+ this.showScene(require('./DownloadTipScene.js'), {});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (e.target.con.classList.contains('img-wrapper') || e.target.con.classList.contains('text-wrapper')) {
|
|
|
// 课件模版 COURSE_WARE_VIDEO(课视频模版) COURSE_WARE_LIST(课列表)
|
|
|
- let id = e.target.con.dataset.id;
|
|
|
+ // 当前是否是正在下载的课件,禁止重新下载行为等待下载动作结束
|
|
|
|
|
|
- //检查课的权限
|
|
|
+ let id = e.target.con.dataset.id;
|
|
|
+ //检查课的权限
|
|
|
//首先获取课的序号
|
|
|
let lessonSeq = parseInt(e.target.con.dataset.seq);
|
|
|
if (!this.isAuthorized(lessonSeq)) {
|
|
|
- //新添需求,如果该课程未购买,出现确认购买弹框
|
|
|
this.showScene(require('./BuyConfirmScene.js'), {});
|
|
|
return;
|
|
|
}
|
|
@@ -356,6 +374,7 @@ class CourseScene extends scene {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//点击课程配套列表中的某个配套
|
|
|
if (e.target.con.classList.contains('periphery-wrapper')) {
|
|
|
document.querySelector('.periphery-container').style.opacity = '0';
|