|
@@ -343,25 +343,37 @@ class CourseScene extends scene {
|
|
|
|
|
|
// 点击正在下载的某一课
|
|
// 点击正在下载的某一课
|
|
if (e.target.con.classList.contains('download-btn-lesson-list-ongoing') || e.target.con.classList.contains('download-btn-lesson-icon-ready')) {
|
|
if (e.target.con.classList.contains('download-btn-lesson-list-ongoing') || e.target.con.classList.contains('download-btn-lesson-icon-ready')) {
|
|
|
|
+ console.log('e.target', e.target);
|
|
|
|
+ let id = (e.target.id).split("download-btn-")[1];
|
|
|
|
+
|
|
|
|
+ APIClient.getDownloadProcess( id, ( isTrue, res)=> {
|
|
|
|
+ let storageUsageStr = res.data.resSize + '/' + res.data.resTotal;
|
|
|
|
+ let downloadProcess = document.getElementById('downloadProcess');
|
|
|
|
+ downloadProcess.innerText = storageUsageStr;
|
|
|
|
+ } )
|
|
this.showScene(require('./DownloadTipScene.js'), {});
|
|
this.showScene(require('./DownloadTipScene.js'), {});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
if (e.target.con.classList.contains('img-wrapper') || e.target.con.classList.contains('text-wrapper')) {
|
|
if (e.target.con.classList.contains('img-wrapper') || e.target.con.classList.contains('text-wrapper')) {
|
|
// 课件模版 COURSE_WARE_VIDEO(课视频模版) COURSE_WARE_LIST(课列表)
|
|
// 课件模版 COURSE_WARE_VIDEO(课视频模版) COURSE_WARE_LIST(课列表)
|
|
-
|
|
|
|
var targetSeq =(e.target.id).split("lesson-btn-")[1];
|
|
var targetSeq =(e.target.id).split("lesson-btn-")[1];
|
|
|
|
+ let id = e.target.con.dataset.id;
|
|
|
|
+
|
|
let downloadElements = document.getElementsByClassName('download-btn-lesson-list-ongoing');
|
|
let downloadElements = document.getElementsByClassName('download-btn-lesson-list-ongoing');
|
|
for ( let i = 0;i< downloadElements.length;i++) {
|
|
for ( let i = 0;i< downloadElements.length;i++) {
|
|
let goingAeq = downloadElements[i].getAttribute("data-seq");
|
|
let goingAeq = downloadElements[i].getAttribute("data-seq");
|
|
if( targetSeq == goingAeq ) {
|
|
if( targetSeq == goingAeq ) {
|
|
|
|
+ APIClient.getDownloadProcess( id, ( isTrue, res)=> {
|
|
|
|
+ let storageUsageStr = res.data.resSize + '/' + res.data.resTotal;
|
|
|
|
+ let downloadProcess = document.getElementById('downloadProcess');
|
|
|
|
+ downloadProcess.innerText = storageUsageStr;
|
|
|
|
+ } )
|
|
this.showScene(require('./DownloadTipScene.js'), {});
|
|
this.showScene(require('./DownloadTipScene.js'), {});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- let id = e.target.con.dataset.id;
|
|
|
|
//检查课的权限
|
|
//检查课的权限
|
|
//首先获取课的序号
|
|
//首先获取课的序号
|
|
let lessonSeq = parseInt(e.target.con.dataset.seq);
|
|
let lessonSeq = parseInt(e.target.con.dataset.seq);
|