Browse Source

添加点击提示框 增加返回字段

sophieChenyx 6 years ago
parent
commit
6144471c3e

BIN
src/stage/index/assets/img/IndexScene/background.png


BIN
src/stage/index/assets/img/IndexScene/index_bg.png


BIN
src/stage/index/assets/img/IndexScene/logo.png


+ 11 - 13
src/stage/index/scene/CourseScene.js

@@ -346,19 +346,17 @@ class CourseScene extends scene {
       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(课列表)
-			// 当前是否是正在下载的课件,禁止重新下载行为等待下载动作结束
+      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.parentWidget.childWidgets[i].con.classList.contains('download-btn-lesson-icon-ready')) {
+            this.showScene(require('./DownloadTipScene.js'), {});
+            return;
+          }
+        }
+      }
 
 			let id = e.target.con.dataset.id;
       //检查课的权限
@@ -419,9 +417,9 @@ class CourseScene extends scene {
     //点击课的下载按钮
     if (e.target.con.classList.contains('download-btn-lesson-list-ready')
 		|| e.target.con.classList.contains('download-btn-lesson-icon-ready')) {
-			let courseID = this.id;
+      let courseID = this.id;
 			let courseName = this.title;
-
+      TVUtil.Toast.show('点击下载', 1500);
 			let lessonID = e.target.con.dataset.id;
 			let lessonName = e.target.con.dataset.name;
 

+ 3 - 3
src/stage/index/style/IndexScene.less

@@ -51,15 +51,15 @@
 	width: unit(@designWidth, rem);
 	height: unit(@designHeight, rem);
 	padding: 0.05rem 1.2rem .5rem;
-	background-image: url('assets/img/IndexScene/index_bg.png');
+	background-image: url('assets/img/IndexScene/background.png');
 	background-size: cover;
 	background-repeat: no-repeat;
 
 	.m-logo{
 		position: absolute;
 		top: 1rem;
-		width: 3.62rem;
-		height: 1.30rem;
+		width: 5.64rem;
+		height: 1.2rem;
 		background-image: url('assets/img/IndexScene/logo.png');
 		background-size: 100% 100%;
 		background-repeat: no-repeat;

+ 1 - 1
src/util/API/AJAXHelper.js

@@ -61,7 +61,7 @@ class AJAXHelper {
 		xmlHttpReq.setRequestHeader('eid', eid);
 		xmlHttpReq.setRequestHeader('uid', uid);
 		xmlHttpReq.setRequestHeader('sign', sign);
-		xmlHttpReq.setRequestHeader('merchant', 'baby');
+		xmlHttpReq.setRequestHeader('merchant', '21st');
 		xmlHttpReq.setRequestHeader('terminal', platform);
 		xmlHttpReq.setRequestHeader('requestId', requestId);
 		xmlHttpReq.setRequestHeader('Authentication', sign); //header中增加Authentication以兼容老版本

+ 11 - 7
src/util/API/APIClient.js

@@ -4,7 +4,7 @@ import userDataStorage from '../userDataStorage';
 import Utils from '../Utils';
 
 class APIClient {
-	constructor() { }
+	constructor() {}
 
 	// 添加缓存参数,安卓截获带有此参数的请求
 	static addCacheParam(params, cacheKeySrc=null, cacheKey=null){
@@ -24,24 +24,28 @@ class APIClient {
 
 	// 账户登录,获取token,绑定设备
 	static userLoginAndBindDevice(data, callback) {
+		let deviceModel,deviceMfrs,deviceBrand = '';
 		let deviceCode = localStorage.getItem('deviceCode');
-		let deviceType = "";
     if(window.efunbox) {
-      deviceType = window.efunbox.getTypeForDevice();
+      deviceModel = window.efunbox.getModelForDevice();
+      deviceMfrs = window.efunbox.getMfrsForDevice();
+      deviceBrand = window.efunbox.getBrandForDevice();
 		}
 		if (!deviceCode) {
 			if (window.efunbox) {
-				deviceCode = window.efunbox.getUuidForDevice();
+        deviceCode = window.efunbox.getUuidForDevice();
 			} else {
-				deviceCode = Utils.getUuidForWeb();
+        deviceCode = Utils.getUuidForWeb();
 			}
 			localStorage.setItem('deviceCode', deviceCode);
 		}
 		let params = {
-			deviceCode,
+      deviceCode,
 			eid: data.usercode,
 			password: data.password,
-      deviceType: deviceType
+      deviceModel: deviceModel,
+      deviceMfrs: deviceMfrs,
+      deviceBrand: deviceBrand
 		};
 		AJAXHelper.post('/token', params, callback);
 	}