Преглед на файлове

Merge branch 'dev_winpc_touch' of http://gogs.efunbox.cn:3000/Rankin/2BTV-Web into dev_winpc_touch

zhanghe преди 6 години
родител
ревизия
95987feff3

+ 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 - 3
src/stage/index/scene/IndexScene.js

@@ -104,9 +104,7 @@ class IndexScene extends scene {
 	}
 
   loadDownloadList() {
-    APIClient.getDownloadList( ( isTrue,res) => {
-      console.log('fail result',res)
-    })
+    APIClient.getDownloadList( ( isTrue,res) => {})
 	}
 
 	onCreate() {

+ 6 - 0
src/stage/index/scene/LoginScene.js

@@ -36,7 +36,13 @@ class LoginScene extends scene {
       		this.showScene(require('./IndexScene.js'), {});
 				}
 			} else if (Consts.API_CODE_ISBOUND == res.code) {
+				//账号被登陆
 				this.showScene(require('./RepeatLoginScene.js'), {});
+        this.sidInput.value = '|';
+        this.passwordInput.value = '';
+        this.moye.root.getWidgetById('sid-input').focus();
+        this.onKeydown();
+
 			} else {
 				TVUtil.Toast.show('帐号或密码错误!', 3000);
 			}

+ 0 - 2
src/stage/index/scene/RepeatLoginScene.js

@@ -5,7 +5,6 @@ class RepeatLoginScene extends scene {
 
 	onCreate() {
 		this.setContentView(require('../../../res/tpl/RepeatLoginScene.tpl'), {}, 'RepeatLoginScene', {'isParentShow': true}, () => {
-			// 默认光标指向"知道了"按钮
 			this.moye.root.getWidgetById('iknow-btn').focus();
 		});
 	}
@@ -40,7 +39,6 @@ class RepeatLoginScene extends scene {
 			this.hideScene({});
 		}
 	}
-
 	onBack() {
 
 	}

+ 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 - 3
src/util/API/AJAXHelper.js

@@ -52,9 +52,10 @@ 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 url = AJAXHelper.genAPIUrl(path, method, { eid, uid, t:timestamp, terminal: platform, ...data });
 		let xmlHttpReq = new XMLHttpRequest();
 		xmlHttpReq.open(method, url, true);
 		//构造请求头(每个请求都带的公共参数)