소스 검색

修改下载页面内容滚轮

sophieChenyx 6 년 전
부모
커밋
39f3c8cc23

+ 0 - 16
src/stage/index/scene/CourseScene.js

@@ -357,23 +357,7 @@ class CourseScene extends scene {
 
 		if (e.target.con.classList.contains('img-wrapper') || e.target.con.classList.contains('text-wrapper')) {
 			// 课件模版 COURSE_WARE_VIDEO(课视频模版)  COURSE_WARE_LIST(课列表)
-      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');
-			for ( let i = 0;i< downloadElements.length;i++) {
-        let goingAeq =  downloadElements[i].getAttribute("data-seq");
-        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'), {});
-          return;
-        }
-      }
-
       //检查课的权限
 			//首先获取课的序号
 			let lessonSeq = parseInt(e.target.con.dataset.seq);

+ 15 - 10
src/stage/index/scene/DelConfirmScene.js

@@ -9,6 +9,7 @@ class DelConfirmScene extends scene {
 			'isParentShow': true
 		}, () => {
 			let delName = document.querySelector('#del-name');
+
 			if ('ShopCartScene' == data.parentScene) {
 				delName.innerHTML = `确认删除“${data.title}”吗?`;
 				this.moye.root.reRender();
@@ -21,15 +22,19 @@ class DelConfirmScene extends scene {
 				};
 				return;
 			}
-			delName.innerHTML = `确认删除“${data.title}”吗?`;
-			this.moye.root.reRender();
-			// 默认光标指向取消按钮
-			this.moye.root.getWidgetById('cancle-btn').focus();
-			// 记录下课id
-			this.store = {
-				lessonId: data.lessonId,
-				parentScene: data.parentScene,
-			};
+			if ('DownloadManagerScene' == data.parentScene) {
+        delName.innerHTML = `确认删除“${data.title}”吗?`;
+        this.moye.root.reRender();
+        // 默认光标指向取消按钮
+        this.moye.root.getWidgetById('cancle-btn').focus();
+        // 记录下课id
+        this.store = {
+          lessonId: data.lessonId,
+          parentScene: data.parentScene,
+        };
+        return;
+			}
+
 		});
 	}
 
@@ -56,7 +61,7 @@ class DelConfirmScene extends scene {
 	// 在使用Atv时Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	onOK(e) {
-		let parentScene = this.store['parentScene'];
+    let parentScene = this.store['parentScene'];
 		delete this.store.parentScene;
 		if (e.target.con.id == 'del-btn') {
 			this.store.isDelete = true;

+ 1 - 1
src/stage/index/scene/DownloadManagerScene.js

@@ -168,7 +168,7 @@ class DownloadManagerScene extends scene {
     }
 
     onResume(retData) {
-      if (!retData) return;
+      if (!retData || !retData.isDelete) return;
       //send delete cmd
       let lessonId = retData.lessonId;
       let courseId = this.lessonItems[lessonId]['courseId']

+ 2 - 2
src/stage/index/style/DownloadScene.less

@@ -111,9 +111,9 @@
 		position: absolute;
 		width: 100%;
 		margin-left: 0.38rem;
-		display:table;
+		display:block;
 		height: 7.39rem;
-    	overflow: hidden;
+    	overflow: scroll;
 
 		.scroll-lines-wrapper{
 			z-index: 1;

+ 4 - 5
src/util/API/AJAXHelper.js

@@ -52,14 +52,13 @@ class AJAXHelper {
 		let platform = 'tv';
 		if (!window.efunbox) {
 			platform = 'web';
-		}
-		let url = AJAXHelper.genAPIUrl(path, method, { eid, uid, terminal: platform, ...data });
-		//添加时间戳
-		let timestamp = new Date().getTime();
+    }
+    //添加时间戳
+    let timestamp = new Date().getTime();
+    let url = AJAXHelper.genAPIUrl(path, method, { eid, uid, t:timestamp, terminal: platform, ...data });
 		let xmlHttpReq = new XMLHttpRequest();
 		xmlHttpReq.open(method, url, true);
 		//构造请求头(每个请求都带的公共参数)
-		xmlHttpReq.setRequestHeader('t', timestamp);
 		xmlHttpReq.setRequestHeader('eid', eid);
 		xmlHttpReq.setRequestHeader('uid', uid);
 		xmlHttpReq.setRequestHeader('sign', sign);