Browse Source

Merge remote-tracking branch 'remotes/origin/dev_winpc_touch' into online_winpc_kid

zhouxianguang 6 years ago
parent
commit
4d71cfb2a7
68 changed files with 8916 additions and 712 deletions
  1. 1 0
      .gitignore
  2. 29 22
      src/lib/js/FocusEngine.js
  3. 6764 0
      src/lib/js/ckplayer/ckplayer.js
  4. 112 0
      src/lib/js/ckplayer/ckplayer.min.js
  5. BIN
      src/lib/js/ckplayer/ckplayer.swf
  6. 106 0
      src/lib/js/ckplayer/ckplayer.xml
  7. 0 0
      src/lib/js/ckplayer/hls.min.js
  8. 44 0
      src/lib/js/ckplayer/language.xml
  9. 641 0
      src/lib/js/ckplayer/style.xml
  10. 4 1
      src/res/tpl/CLScene.tpl
  11. 17 0
      src/res/tpl/CourseList.tpl
  12. 3 0
      src/res/tpl/CourseScene.tpl
  13. 3 0
      src/res/tpl/DataBuildingScene.tpl
  14. 6 3
      src/res/tpl/DownloadScene.tpl
  15. 3 0
      src/res/tpl/GlobalGoodDetail.tpl
  16. 9 2
      src/res/tpl/ImageWareFullScreen.tpl
  17. 7 2
      src/res/tpl/IndexScene.tpl
  18. 3 0
      src/res/tpl/LessonScene.tpl
  19. 8 0
      src/res/tpl/LoginScene.tpl
  20. 6 3
      src/res/tpl/ShopCartScene.tpl
  21. 8 4
      src/res/tpl/TerminalScene.tpl
  22. 1 1
      src/res/values/api.json
  23. BIN
      src/stage/index/assets/img/CLScene/background.jpg
  24. BIN
      src/stage/index/assets/img/CLScene/cl_left.png
  25. BIN
      src/stage/index/assets/img/CLScene/name_text.png
  26. BIN
      src/stage/index/assets/img/IndexScene/index_bg.png
  27. BIN
      src/stage/index/assets/img/IndexScene/logo.png
  28. BIN
      src/stage/index/assets/img/LoginScene/background.png
  29. BIN
      src/stage/index/assets/img/LoginScene/left_bg.png
  30. BIN
      src/stage/index/assets/img/LoginScene/page_bg.png
  31. BIN
      src/stage/index/assets/img/LoginScene/right_bg.png
  32. BIN
      src/stage/index/assets/img/backward.png
  33. BIN
      src/stage/index/assets/img/forward.png
  34. BIN
      src/stage/index/assets/img/goback.png
  35. 10 6
      src/stage/index/index.html
  36. 2 0
      src/stage/index/index.less
  37. 23 63
      src/stage/index/scene/CLScene.js
  38. 30 59
      src/stage/index/scene/CourseScene.js
  39. 5 2
      src/stage/index/scene/DataBuildingScene.js
  40. 1 1
      src/stage/index/scene/DelConfirmScene.js
  41. 87 70
      src/stage/index/scene/DownloadManagerScene.js
  42. 6 0
      src/stage/index/scene/GlobalGoodDetailScene.js
  43. 64 19
      src/stage/index/scene/ImageWareFullScreenScene.js
  44. 1 0
      src/stage/index/scene/IndexScene.js
  45. 417 157
      src/stage/index/scene/LessonScene.js
  46. 6 0
      src/stage/index/scene/ShopCartScene.js
  47. 11 5
      src/stage/index/scene/TerminalScene.js
  48. 17 2
      src/stage/index/scene/VideoWareFullScreenScene.js
  49. 1 1
      src/stage/index/style/BuyConfirmScene.less
  50. 15 21
      src/stage/index/style/CLScene.less
  51. 29 18
      src/stage/index/style/CourseScene.less
  52. 2 2
      src/stage/index/style/DelConfirmScene.less
  53. 10 21
      src/stage/index/style/DownloadScene.less
  54. 3 3
      src/stage/index/style/GlobalGoodDetail.less
  55. 30 10
      src/stage/index/style/ImageWareFullScreen.less
  56. 89 47
      src/stage/index/style/IndexScene.less
  57. 12 12
      src/stage/index/style/LessonScene.less
  58. 27 26
      src/stage/index/style/LoginScene.less
  59. 15 0
      src/stage/index/style/Mixins.less
  60. 1 1
      src/stage/index/style/RepeatLoginScene.less
  61. 19 16
      src/stage/index/style/ShopCartScene.less
  62. 67 49
      src/stage/index/style/TerminalScene.less
  63. 5 0
      src/util/API/APIClient.js
  64. 5 2
      src/util/Consts.js
  65. 58 0
      src/util/EfunVideoPlayer.js
  66. 1 1
      src/util/Utils.js
  67. 64 0
      src/util/WinBoxAPI.js
  68. 8 60
      src/util/course.js

+ 1 - 0
.gitignore

@@ -22,3 +22,4 @@ src/models/*
 *.jade
 *.jade
 **/pug
 **/pug
 *.tar
 *.tar
+*.iml

+ 29 - 22
src/lib/js/FocusEngine.js

@@ -52,7 +52,7 @@
 
 
 	// webpack入口,用于打包标签引用的build文件,引入页面后会创建全局的FocusEngine对象。
 	// webpack入口,用于打包标签引用的build文件,引入页面后会创建全局的FocusEngine对象。
 
 
-	
+
 
 
 	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 
 
@@ -68,7 +68,7 @@
 /* 1 */
 /* 1 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -326,7 +326,7 @@
 /* 3 */
 /* 3 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -690,14 +690,21 @@
 	              e.preventDefault();
 	              e.preventDefault();
 	            }
 	            }
 	            if (!w.disabled && w.getDOMNode().style.visibility != 'hidden') {
 	            if (!w.disabled && w.getDOMNode().style.visibility != 'hidden') {
-	              if (w.focused) {
-	                w.fire(new _event2['default']('ok', w, { isClick: true }));
-	              } else {
-	                var canFocus = w.getDOMNode().getAttribute('can-focus');
-	                if (canFocus != 'no') {
-	                  w.focus();
-	                }
-	              }
+                var canFocus = w.getDOMNode().getAttribute('can-focus');
+                if (canFocus != 'no') {
+                  w.focus();
+                }
+								setTimeout(function() {
+	              	w.fire(new _event2['default']('ok', w, { isClick: true }));
+								}, 50);
+	              // if (w.focused) {
+	              //   w.fire(new _event2['default']('ok', w, { isClick: true }));
+	              // } else {
+	              //   var canFocus = w.getDOMNode().getAttribute('can-focus');
+	              //   if (canFocus != 'no') {
+	              //     w.focus();
+	              //   }
+	              // }
 	            }
 	            }
 	            return;
 	            return;
 	            // 如果找到的第一个组件不是叶子组件,则不进行操作
 	            // 如果找到的第一个组件不是叶子组件,则不进行操作
@@ -1265,7 +1272,7 @@
 /* 4 */
 /* 4 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -1535,7 +1542,7 @@
 /* 5 */
 /* 5 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -2019,7 +2026,7 @@
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
 	// requestAnimationFrame shim for Blitz
 	// requestAnimationFrame shim for Blitz
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -2248,7 +2255,7 @@
 	 */
 	 */
 
 
 	// These values are established by empiricism with tests (tradeoff: performance VS precision)
 	// These values are established by empiricism with tests (tradeoff: performance VS precision)
-	
+
 
 
 	var NEWTON_ITERATIONS = 4;
 	var NEWTON_ITERATIONS = 4;
 	var NEWTON_MIN_SLOPE = 0.001;
 	var NEWTON_MIN_SLOPE = 0.001;
@@ -2364,7 +2371,7 @@
 /* 8 */
 /* 8 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -3390,7 +3397,7 @@
 /* 9 */
 /* 9 */
 /***/ function(module, exports, __webpack_require__) {
 /***/ function(module, exports, __webpack_require__) {
 
 
-	
+
 
 
 	Object.defineProperty(exports, '__esModule', {
 	Object.defineProperty(exports, '__esModule', {
 	  value: true
 	  value: true
@@ -3641,11 +3648,11 @@
 	    }
 	    }
 	    if (this.isSetData) {
 	    if (this.isSetData) {
 	      this.listDom.style.transition = '';
 	      this.listDom.style.transition = '';
-	      this.listDom.style.transform = 'translateY(' + (offset + this.rect.height) + 'px)';
+	      // this.listDom.style.transform = 'translateY(' + (offset + this.rect.height) + 'px)';
 	      this.offset = offset + this.rect.height;
 	      this.offset = offset + this.rect.height;
 	      setTimeout(function () {
 	      setTimeout(function () {
 	        _this4.listDom.style.transition = 'transform ' + _this4.duration + 's ' + _this4.easing;
 	        _this4.listDom.style.transition = 'transform ' + _this4.duration + 's ' + _this4.easing;
-	        _this4.listDom.style.transform = 'translateY(' + offset + 'px)';
+	        // _this4.listDom.style.transform = 'translateY(' + offset + 'px)';
 	        var des = -_this4.rect.height / 3;
 	        var des = -_this4.rect.height / 3;
 	        _this4.offset = offset;
 	        _this4.offset = offset;
 	        !_this4.isScrolling && _this4.fire(new _event2['default']('scrollstart', _this4, { des: des }));
 	        !_this4.isScrolling && _this4.fire(new _event2['default']('scrollstart', _this4, { des: des }));
@@ -3653,7 +3660,7 @@
 	      }, 300);
 	      }, 300);
 	    } else {
 	    } else {
 	      this.listDom.style.transition = 'transform ' + this.duration + 's ' + this.easing;
 	      this.listDom.style.transition = 'transform ' + this.duration + 's ' + this.easing;
-	      this.listDom.style.transform = 'translateY(' + offset + 'px)';
+	      // this.listDom.style.transform = 'translateY(' + offset + 'px)';
 	      var des = offset - this.offset;
 	      var des = offset - this.offset;
 	      this.offset = offset;
 	      this.offset = offset;
 	      !this.isScrolling && this.fire(new _event2['default']('scrollstart', this, { des: des }));
 	      !this.isScrolling && this.fire(new _event2['default']('scrollstart', this, { des: des }));
@@ -3707,7 +3714,7 @@
 	    for (var i = 0; i < this.childWidgets.length; i++) {
 	    for (var i = 0; i < this.childWidgets.length; i++) {
 	      var widget = this.childWidgets[i];
 	      var widget = this.childWidgets[i];
 	      var delay = -Math.abs(widget.col - curWidget.col) * e.des * this.delay;
 	      var delay = -Math.abs(widget.col - curWidget.col) * e.des * this.delay;
-	      widget.con.style.transform = 'translateY(' + delay + 'px)';
+	      // widget.con.style.transform = 'translateY(' + delay + 'px)';
 	    }
 	    }
 	  };
 	  };
 
 
@@ -3760,4 +3767,4 @@
 	module.exports = exports['default'];
 	module.exports = exports['default'];
 
 
 /***/ }
 /***/ }
-/******/ ]);
+/******/ ]);

File diff suppressed because it is too large
+ 6764 - 0
src/lib/js/ckplayer/ckplayer.js


File diff suppressed because it is too large
+ 112 - 0
src/lib/js/ckplayer/ckplayer.min.js


BIN
src/lib/js/ckplayer/ckplayer.swf


File diff suppressed because it is too large
+ 106 - 0
src/lib/js/ckplayer/ckplayer.xml


src/lib/js/hls.js → src/lib/js/ckplayer/hls.min.js


+ 44 - 0
src/lib/js/ckplayer/language.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+	<language>
+		<adCountdown>[$second]</adCountdown><!--广告播放结束倒计时-->
+		<skipDelay>[$second]</skipDelay>
+		<buttonOver>
+			<play>点击播放</play>
+			<pause>暂停播放</pause>
+			<mute>静音</mute>
+			<escMute>恢复音量</escMute>
+			<full>全屏</full>
+			<escFull>退出全屏</escFull>
+			<previousPage>上一集</previousPage>
+			<nextPage>下一集</nextPage>
+			<definition>点击选择清晰度</definition>
+		</buttonOver>
+		<volumeSliderOver>
+			音量:[$volume]%
+		</volumeSliderOver>
+		<buffer>[$percentage]%</buffer>
+		<timeSliderOver><!--鼠标经过进度条显示的时间格式-->
+			[$timeh]:[$timei]:[$times]
+		</timeSliderOver>
+		<liveAndVod>
+			[$timeh]:[$timei]:[$times]
+		</liveAndVod>
+		<live>
+			直播中 [$liveTimeY]-[$liveTimem]-[$liveTimed] [$liveTimeh]:[$liveTimei]:[$liveTimes]
+		</live>
+		<m3u8Definition>
+			<name>流畅</name>
+			<name>低清</name>
+			<name>标清</name>
+			<name>高清</name>
+			<name>超清</name>
+			<name>蓝光</name>
+			<name>未知</name>
+		</m3u8Definition>
+		<error>
+			<cannotFindUrl>视频地址不存在</cannotFindUrl>
+			<streamNotFound>加载失败</streamNotFound>
+			<formatError>视频格式错误</formatError>
+		</error>
+		<definition>自动</definition>
+	</language>

File diff suppressed because it is too large
+ 641 - 0
src/lib/js/ckplayer/style.xml


+ 4 - 1
src/res/tpl/CLScene.tpl

@@ -1,5 +1,5 @@
 <div id="CLScene" fe-role="Switch">
 <div id="CLScene" fe-role="Switch">
-	<div class="cl-bg"><img id="CLSceneBG" src="assets/img/CLScene/background.jpg" alt=""></div>
+
     <div id="cl-left-panel">
     <div id="cl-left-panel">
         <div id="name-text"></div>
         <div id="name-text"></div>
         <div id="cl-left-tab-scroll" fe-role="Scroll" fe-cfg="scroll_dir:v">
         <div id="cl-left-tab-scroll" fe-role="Scroll" fe-cfg="scroll_dir:v">
@@ -21,4 +21,7 @@
             </div>
             </div>
         </div>
         </div>
     </div>
     </div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 17 - 0
src/res/tpl/CourseList.tpl

@@ -0,0 +1,17 @@
+<div id="CourseList" fe-role="Switch">
+    <!--左侧标签栏-->
+    <div id="cl-left-panel">
+        <div class="title">导学</div>
+        <div id="tag-type-list" class="tag-type-list" fe-role="Scroll">
+            <ul class="scroll-list">
+                <li class="class-item" fe-role="Widget">测试标签1</li>
+                <li class="class-item" fe-role="Widget">测试标签2</li>
+                <li class="class-item" fe-role="Widget">测试标签3</li>
+            </ul>
+        </div>
+    </div>
+    <!--右侧课表展示栏-->
+    <div id="cl-right-panel" fe-role="Grille" fe-cfg="bottom_padding:50">
+
+    </div>
+</div>

+ 3 - 0
src/res/tpl/CourseScene.tpl

@@ -15,4 +15,7 @@
 		</div>
 		</div>
 	</div>
 	</div>
 	<div class="main" id="course-main"></div>
 	<div class="main" id="course-main"></div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 3 - 0
src/res/tpl/DataBuildingScene.tpl

@@ -1,3 +1,6 @@
 <div id="DataBuildingScene" fe-role="Switch">
 <div id="DataBuildingScene" fe-role="Switch">
     <img id="building-pic-bg"  src="assets/img/default_bg.jpg" alt="">
     <img id="building-pic-bg"  src="assets/img/default_bg.jpg" alt="">
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 6 - 3
src/res/tpl/DownloadScene.tpl

@@ -1,11 +1,10 @@
 <div id="DownloadManagerScene" fe-role="Switch">
 <div id="DownloadManagerScene" fe-role="Switch">
-	<div class="download-manager-bg">
-		<img src="./assets/img/GlobalGoodDetail/background.jpg" alt="" />
-	</div>
+
   	<div class="local-download-icon">
   	<div class="local-download-icon">
     	<img src="assets/img/DownloadScene/download.png" alt="" />
     	<img src="assets/img/DownloadScene/download.png" alt="" />
     	<div>本地下载列表</div>
     	<div>本地下载列表</div>
   	</div>
   	</div>
+
   	<div class="background-wrapper">
   	<div class="background-wrapper">
 		<div class="background-header">
 		<div class="background-header">
     		<div class="header">
     		<div class="header">
@@ -104,4 +103,8 @@
 			<div class="scroll-list scroll-lines-wrapper clearfix" id="download-status-table-wrapper"></div>
 			<div class="scroll-list scroll-lines-wrapper clearfix" id="download-status-table-wrapper"></div>
 		</div>
 		</div>
 	</div>
 	</div>
+
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 3 - 0
src/res/tpl/GlobalGoodDetail.tpl

@@ -23,4 +23,7 @@
             </ul>
             </ul>
         </div>
         </div>
     </div>
     </div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 9 - 2
src/res/tpl/ImageWareFullScreen.tpl

@@ -1,5 +1,12 @@
 <div id="ImageWareFullScreen" fe-role="Switch">
 <div id="ImageWareFullScreen" fe-role="Switch">
     <img id="wareImg" src="./assets/img/default_bg.jpg" />
     <img id="wareImg" src="./assets/img/default_bg.jpg" />
-    <img id="imgLeft" src="./assets/img/LessonScene/arrow_left.png" />
-    <img id="imgRight" src="./assets/img/LessonScene/arrow_right.png" />
+    <div id="imgLeft" fe-role="Widget">
+        <img src="./assets/img/backward.png" />
+    </div>
+    <div id="imgRight" fe-role="Widget">
+        <img src="./assets/img/forward.png" />
+    </div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 7 - 2
src/res/tpl/IndexScene.tpl

@@ -1,5 +1,7 @@
 <div id="IndexScene" fe-role="Switch">
 <div id="IndexScene" fe-role="Switch">
-	<div class="index-bg"><img src="assets/img/IndexScene/background.jpg" alt=""></div>
+
+	<div class="m-logo"></div>
+
  	<div class="m-header-user" fe-role="Switch">
  	<div class="m-header-user" fe-role="Switch">
 		<div fe-role="Widget" class="user-info" id="user-info">
 		<div fe-role="Widget" class="user-info" id="user-info">
 			<div class="user-info-text">
 			<div class="user-info-text">
@@ -8,7 +10,6 @@
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>
-	<!-- 首页底部的五个入口 -->
 	<div id="index-scroll" class="m-main" fe-role="Scroll" fe-cfg="scroll_dir:v,scroll_duration:0.2,scroll_easing:linear">
 	<div id="index-scroll" class="m-main" fe-role="Scroll" fe-cfg="scroll_dir:v,scroll_duration:0.2,scroll_easing:linear">
 		<div class="scroll-list">
 		<div class="scroll-list">
 			<div id="history" class="history-wrapper"></div>
 			<div id="history" class="history-wrapper"></div>
@@ -21,6 +22,7 @@
 				</div>
 				</div>
 				<div id="fun-resource" class="fun-item" fe-role="Widget">
 				<div id="fun-resource" class="fun-item" fe-role="Widget">
 					<img src="./../../stage/index/assets/img/IndexScene/entrance_resource.png"/>
 					<img src="./../../stage/index/assets/img/IndexScene/entrance_resource.png"/>
+					<div class="wave waves-effect"></div>
 				</div>
 				</div>
 				<div id="fun-periphery" class="fun-item" fe-role="Widget">
 				<div id="fun-periphery" class="fun-item" fe-role="Widget">
 					<img src="./../../stage/index/assets/img/IndexScene/entrance_periphery.png"/>
 					<img src="./../../stage/index/assets/img/IndexScene/entrance_periphery.png"/>
@@ -31,4 +33,7 @@
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>
+	<p class="index_msg">
+		Powered by 领教云课堂
+	</p>
 </div>
 </div>

+ 3 - 0
src/res/tpl/LessonScene.tpl

@@ -8,4 +8,7 @@
 		<div id="view-content"></div>
 		<div id="view-content"></div>
 		<div id="view-bottom"></div>
 		<div id="view-bottom"></div>
 	</div>
 	</div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 8 - 0
src/res/tpl/LoginScene.tpl

@@ -1,5 +1,8 @@
 <div id="LoginScene" fe-role="Switch">
 <div id="LoginScene" fe-role="Switch">
+
+	<!--左侧的输入栏目-->
 	<div class="formBox" fe-role="Switch">
 	<div class="formBox" fe-role="Switch">
+
 		<div class="form-sid">
 		<div class="form-sid">
 			<div class="form-sid-label">
 			<div class="form-sid-label">
 				学&nbsp;&nbsp;号
 				学&nbsp;&nbsp;号
@@ -8,6 +11,7 @@
 				<input id="sid-input" class="form-item" name="sid" type="text" readonly fe-role="Widget"/>
 				<input id="sid-input" class="form-item" name="sid" type="text" readonly fe-role="Widget"/>
 			</div>
 			</div>
 		</div>
 		</div>
+
 		<div class="form-password">
 		<div class="form-password">
 			<div class="form-password-label">
 			<div class="form-password-label">
 				密&nbsp;&nbsp;码
 				密&nbsp;&nbsp;码
@@ -16,10 +20,13 @@
 				<input id="password-input" class="form-item" name="password" type="text" readonly fe-role="Widget"/>
 				<input id="password-input" class="form-item" name="password" type="text" readonly fe-role="Widget"/>
 			</div>
 			</div>
 		</div>
 		</div>
+
 		<div class="form-submit">
 		<div class="form-submit">
 			<input class="form-item" type="submit" id="submit-input" value="登  录" fe-role="Widget"/>
 			<input class="form-item" type="submit" id="submit-input" value="登  录" fe-role="Widget"/>
 		</div>
 		</div>
 	</div>
 	</div>
+
+	<!--右侧的键盘输入-->
 	<div class="keyborad" fe-role="Switch">
 	<div class="keyborad" fe-role="Switch">
 		<div id="key-1" class="keyborad-item" fe-role="Widget">
 		<div id="key-1" class="keyborad-item" fe-role="Widget">
 			<div class="key-icon one"></div>
 			<div class="key-icon one"></div>
@@ -58,4 +65,5 @@
 			<div class="key-icon enter"></div>
 			<div class="key-icon enter"></div>
 		</div>
 		</div>
 	</div>
 	</div>
+
 </div>
 </div>

+ 6 - 3
src/res/tpl/ShopCartScene.tpl

@@ -1,13 +1,16 @@
 <div id="ShopCartScene" fe-role="Switch">
 <div id="ShopCartScene" fe-role="Switch">
-	<div class="cart-bg"><img id="cart-bg" src="assets/img/ShopCartScene/shop_cart_bg.jpg" alt=""></div>
+
+
 	<p class="cart-name" fe-role="Widget" id="cart-name">购物车</p>
 	<p class="cart-name" fe-role="Widget" id="cart-name">购物车</p>
+
 	<div id="cart-empty" class="cart-empty">
 	<div id="cart-empty" class="cart-empty">
 		<p class="empty-text">还没有添加商品</p>
 		<p class="empty-text">还没有添加商品</p>
-		<div class="back-icon">
-		<img src="assets/img/ShopCartScene/backText.png" alt=""></div>
 	</div>
 	</div>
 	<div class="shop-cart-wrapper clearfix" fe-role="Scroll" fe-cfg="scroll_dir:h, auto_list_width:yes, scroll_right_padding: 3rem">
 	<div class="shop-cart-wrapper clearfix" fe-role="Scroll" fe-cfg="scroll_dir:h, auto_list_width:yes, scroll_right_padding: 3rem">
 		<div class="scroll-list" id="shop-cart-wrapper"></div>
 		<div class="scroll-list" id="shop-cart-wrapper"></div>
 	</div>
 	</div>
 	<div fe-role="Widget" class="send-msg" id="send-msg"></div>
 	<div fe-role="Widget" class="send-msg" id="send-msg"></div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
+	</div>
 </div>
 </div>

+ 8 - 4
src/res/tpl/TerminalScene.tpl

@@ -1,7 +1,11 @@
 <div id="TerminalScene" fe-role="Switch">
 <div id="TerminalScene" fe-role="Switch">
-	<div class="terminal-bg">
-		<img src="assets/img/TerminalScene/background.jpg" alt="">
+	<div class="content">
+		<ul fe-role="Switch" class="terminal-wrapper clearfix" id="terminal-wrapper"></ul>
+		<div class="terminal-quit" id="terminal-quit" fe-role="Widget" fe-cfg="default_focus:yes">
+			退出账号
+		</div>
+	</div>
+	<div class="goback" fe-role="Widget">
+		<img src="assets/img/goback.png" />
 	</div>
 	</div>
-	<ul fe-role="Switch" class="terminal-wrapper clearfix" id="terminal-wrapper"></ul>
-	<div class="terminal-quit" id="terminal-quit" fe-role="Widget" fe-cfg="default_focus:yes"></div>
 </div>
 </div>

+ 1 - 1
src/res/values/api.json

@@ -1,4 +1,4 @@
 {
 {
-    "api_url": "https://kid-app.lingjiao.cn",
+    "api_url": "https://kid-winapp.lingjiao.cn",
     "api_url_test": "http://tt-web.api.ai160.com"
     "api_url_test": "http://tt-web.api.ai160.com"
 }
 }

BIN
src/stage/index/assets/img/CLScene/background.jpg


BIN
src/stage/index/assets/img/CLScene/cl_left.png


BIN
src/stage/index/assets/img/CLScene/name_text.png


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


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


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


BIN
src/stage/index/assets/img/LoginScene/left_bg.png


BIN
src/stage/index/assets/img/LoginScene/page_bg.png


BIN
src/stage/index/assets/img/LoginScene/right_bg.png


BIN
src/stage/index/assets/img/backward.png


BIN
src/stage/index/assets/img/forward.png


BIN
src/stage/index/assets/img/goback.png


+ 10 - 6
src/stage/index/index.html

@@ -3,7 +3,7 @@
 
 
 <head>
 <head>
 	<meta charset="UTF-8">
 	<meta charset="UTF-8">
-	<meta name="viewport" content="width=1920">
+	<meta name="viewport" content="width=1920,user-scalable=0">
 	<title>双师教学标准平台</title>
 	<title>双师教学标准平台</title>
 	<link rel="stylesheet" href="../../lib/css/base.css" />
 	<link rel="stylesheet" href="../../lib/css/base.css" />
 </head>
 </head>
@@ -19,7 +19,7 @@
 		    var user_webset_font = getComputedStyle(doc.documentElement, false)['fontSize'];
 		    var user_webset_font = getComputedStyle(doc.documentElement, false)['fontSize'];
 		  }
 		  }
 			//取整后与默认16px的比例系数
 			//取整后与默认16px的比例系数
-		  var xs = parseFloat(user_webset_font) / 16;
+		  // var xs = parseFloat(user_webset_font) / 16;
 			var docEl = doc.documentElement, //根元素html
 			var docEl = doc.documentElement, //根元素html
 			//判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
 			//判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
 			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
 			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
@@ -27,7 +27,7 @@
 				var clientWidth = docEl.clientWidth;
 				var clientWidth = docEl.clientWidth;
 				if (!clientWidth) return;
 				if (!clientWidth) return;
 				if (clientWidth < 1920) {
 				if (clientWidth < 1920) {
-					docEl.style.fontSize = 100 * (clientWidth / 1920) / xs + 'px';
+					docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
 				} else {
 				} else {
 					docEl.style.fontSize = 100 + 'px';
 					docEl.style.fontSize = 100 + 'px';
 				}
 				}
@@ -48,16 +48,21 @@
 		}
 		}
 	</script>
 	</script>
 	<!-- <script src="../../lib/js/alitv-debug.min.js"></script> -->
 	<!-- <script src="../../lib/js/alitv-debug.min.js"></script> -->
-	<script src="../../lib/js/FocusEngine.min.js"></script>
+	<script src="../../lib/js/FocusEngine.js"></script>
 	<script src="../../lib/js/blitz.js"></script>
 	<script src="../../lib/js/blitz.js"></script>
 	<script src="../../lib/js/moye.min.js"></script>
 	<script src="../../lib/js/moye.min.js"></script>
 	<script src="../../lib/js/TVUtil.min.js"></script>
 	<script src="../../lib/js/TVUtil.min.js"></script>
 	<script src="../../lib/js/core.min.js"></script>
 	<script src="../../lib/js/core.min.js"></script>
 	<script src="../../lib/js/sha1.min.js"></script>
 	<script src="../../lib/js/sha1.min.js"></script>
 	<script src="../../lib/js/md5.min.js"></script>
 	<script src="../../lib/js/md5.min.js"></script>
-	<script src="../../lib/js/hls.js"></script>
+	<script src="../../lib/js/ckplayer/hls.min.js"></script>
+	<script src="../../lib/js/ckplayer/ckplayer.js"></script>
 	<script>
 	<script>
+<<<<<<< HEAD
 		var ts = '201806211727';
 		var ts = '201806211727';
+=======
+		var ts = '201807251125';
+>>>>>>> remotes/origin/dev_winpc_touch
 
 
 		var appCss = document.createElement('link');
 		var appCss = document.createElement('link');
 		appCss.rel = 'stylesheet';
 		appCss.rel = 'stylesheet';
@@ -85,5 +90,4 @@
 		}
 		}
 	</script>
 	</script>
 </body>
 </body>
-
 </html>
 </html>

+ 2 - 0
src/stage/index/index.less

@@ -2,6 +2,8 @@
 
 
 @borderSize: 0.05;
 @borderSize: 0.05;
 @borderRadius: 0.2;
 @borderRadius: 0.2;
+@designWidth: 19.2;
+@designHeight: 10.8;
 
 
 body {
 body {
     width: 100%;
     width: 100%;

+ 23 - 63
src/stage/index/scene/CLScene.js

@@ -1,9 +1,8 @@
-import APIClient from '../../../util/API/APIClient';
-import Consts from '../../../util/Consts';
-import CourseItem from '../../../component/CourseItem';
-import TrainingItem from '../../../component/TrainingItem';
-import GoodsItem from '../../../component/GoodsItem';
-import ScrollEventPlugin from '../../../util/ScrollEventPlugin';
+import APIClient from '../../../util/API/APIClient'
+import Consts from '../../../util/Consts'
+import CourseItem from '../../../component/CourseItem'
+import GoodsItem from '../../../component/GoodsItem'
+import ScrollEventPlugin from '../../../util/ScrollEventPlugin'
 import ShopCartState from '../../../util/ShopCartState';
 import ShopCartState from '../../../util/ShopCartState';
 import NotificationCenter from '../../../util/NotificationCenter';
 import NotificationCenter from '../../../util/NotificationCenter';
 
 
@@ -16,7 +15,6 @@ class CLScene extends scene {
         this.hasNextPage = false;
         this.hasNextPage = false;
         this.currentIndex = 1;
         this.currentIndex = 1;
         this.noContent = false;
         this.noContent = false;
-        this.trainingMap = {};
     }
     }
 
 
     renderLeftTagList(dataset) {
     renderLeftTagList(dataset) {
@@ -48,30 +46,15 @@ class CLScene extends scene {
         document.getElementById('no-content-message').style.display = this.noContent ? '' : 'none';
         document.getElementById('no-content-message').style.display = this.noContent ? '' : 'none';
 
 
         for (let i in dataset) {
         for (let i in dataset) {
-            const { id, title, subTitle, coverUrl, auth, goods, imgList, redDot, openTime, closeTime, dateDesc } = dataset[i];
+            const { id, title, subTitle, coverUrl, auth, goods } = dataset[i];
             let price = '';
             let price = '';
             if (goods && goods.length >= 1) {
             if (goods && goods.length >= 1) {
                 price = goods[0].terminalPrice;
                 price = goods[0].terminalPrice;
             }
             }
 
 
-            // 师训详情图片预加载
-            this.trainingMap[id] = imgList;
-            if (imgList) {
-              for (let index in imgList) {
-                let imgSrc = Consts.IMG_PATH + '/' + imgList[index];
-                let image = new Image();
-                image.src = imgSrc;
-              }
-            }
-
             let item = document.createElement('li');
             let item = document.createElement('li');
-            // 为training item 添加不同样式
-            if (this.sceneType == 'training') {
-              item.setAttribute('class', 'training-item');
-            } else {
-              item.setAttribute('class', 'item');
-            }
             item.setAttribute('id', `item-${id}`);
             item.setAttribute('id', `item-${id}`);
+            item.setAttribute('class', 'item');
             item.setAttribute('fe-role', 'Widget');
             item.setAttribute('fe-role', 'Widget');
 
 
             if (0 == i) {
             if (0 == i) {
@@ -85,21 +68,14 @@ class CLScene extends scene {
                     title,
                     title,
                     price,
                     price,
                     correlative: subTitle,
                     correlative: subTitle,
-                    img: Consts.IMG_PATH + '/' + coverUrl,
+                    img: Consts.IMG_PATH + '/' + coverUrl
                 }
                 }
-            } else if (this.sceneType == 'training') {
-                itemDataset = {
-                    subject: title || '',
-                    subjectSub: dateDesc || '',
-                    isNew: redDot ? true : false,
-                    img: Consts.IMG_PATH + '/' + coverUrl,
-                };
             } else {
             } else {
                 itemDataset = {
                 itemDataset = {
                     subject: title,
                     subject: title,
                     subjectSub: subTitle,
                     subjectSub: subTitle,
                     buyed: auth,
                     buyed: auth,
-                    img: Consts.IMG_PATH+ '/' + coverUrl,
+                    img: Consts.IMG_PATH+ '/' + coverUrl
                 }
                 }
             }
             }
 
 
@@ -121,8 +97,6 @@ class CLScene extends scene {
                 this.loadPeripheryList(this.selectedTagId, 1);
                 this.loadPeripheryList(this.selectedTagId, 1);
             } else if (this.sceneType == 'collection') {
             } else if (this.sceneType == 'collection') {
                 this.loadCollectionList(this.selectedTagId, 1);
                 this.loadCollectionList(this.selectedTagId, 1);
-            } else if (this.sceneType == 'training') {
-                this.loadTrainingList(this.selectedTagId, 1);
             } else {
             } else {
                 this.loadCourseList(this.selectedTagId, 1);
                 this.loadCourseList(this.selectedTagId, 1);
             }
             }
@@ -171,6 +145,7 @@ class CLScene extends scene {
       });
       });
     }
     }
 
 
+    //当前无意义
     loadPeripheryList(tagId, index) {
     loadPeripheryList(tagId, index) {
       APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
       APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
         if (!isTrue) { return; }
         if (!isTrue) { return; }
@@ -182,26 +157,12 @@ class CLScene extends scene {
         this.rightScrollEvent.releaseEventLock();
         this.rightScrollEvent.releaseEventLock();
       });
       });
     }
     }
-
-    loadTrainingList(tagId, index) {
-      APIClient.getProductListByTagId(tagId, index, (isTrue, res) => {
-        if (!isTrue) { return; }
-        if (!res.success) { return; }
-        const { pageNo, pageSize, totalSize, list } = res.data || {};
-        this.hasNextPage = pageNo * pageSize < totalSize ? true : false;
-        this.currentIndex = pageNo;
-        this.renderRightContentList(list, TrainingItem, index > 1);
-        this.rightScrollEvent.releaseEventLock();
-      });
-    }
-
     loadTagList() {
     loadTagList() {
         let type = {
         let type = {
             periphery: 'PERIPHERY',
             periphery: 'PERIPHERY',
             resource: 'RESOURCE',
             resource: 'RESOURCE',
             training: 'TRAINING',
             training: 'TRAINING',
         }[this.sceneType] || 'RESOURCE';
         }[this.sceneType] || 'RESOURCE';
-
         APIClient.getTagListByGroupCode(type, (isTrue, res) => {
         APIClient.getTagListByGroupCode(type, (isTrue, res) => {
             if (!isTrue) { return; }
             if (!isTrue) { return; }
             if (!res.success) {
             if (!res.success) {
@@ -229,14 +190,12 @@ class CLScene extends scene {
                 this.loadPeripheryList(this.selectedTagId, 1);
                 this.loadPeripheryList(this.selectedTagId, 1);
             } else if (this.sceneType == 'collection') {
             } else if (this.sceneType == 'collection') {
                 this.loadCollectionList(this.selectedTagId, 1);
                 this.loadCollectionList(this.selectedTagId, 1);
-            } else if (this.sceneType == 'training') {
-                this.loadTrainingList(this.selectedTagId, 1);
             } else {
             } else {
                 this.loadCourseList(this.selectedTagId, 1);
                 this.loadCourseList(this.selectedTagId, 1);
             }
             }
         });
         });
     }
     }
-
+    //收藏
     collectionObserver() {
     collectionObserver() {
         if (this.sceneType == 'collection') {
         if (this.sceneType == 'collection') {
             this.loadCourseList(this.selectedTagId, 1);
             this.loadCourseList(this.selectedTagId, 1);
@@ -245,15 +204,13 @@ class CLScene extends scene {
 
 
     onCreate(data) {
     onCreate(data) {
         this.setContentView(require('../../../res/tpl/CLScene.tpl'), {}, 'CLScene', {}, () => {
         this.setContentView(require('../../../res/tpl/CLScene.tpl'), {}, 'CLScene', {}, () => {
-            // 页面渲染完成异步回调
             this.sceneType = data.type;
             this.sceneType = data.type;
-            this.loadTagList();
-            this.initLeftTabOnFocus();
-
-            this.rightScrollEvent.bind(this.moye.root.getWidgetById('cl-right-content-scroll'));
-            ShopCartState.getCount();
-
-            NotificationCenter.add('collection_refresh', this.collectionObserver.bind(this));
+          console.log( 'currentTime sceneType',data)
+          this.loadTagList();
+          this.initLeftTabOnFocus();
+          this.rightScrollEvent.bind(this.moye.root.getWidgetById('cl-right-content-scroll'));
+          ShopCartState.getCount();
+          NotificationCenter.add('collection_refresh', this.collectionObserver.bind(this));
         });
         });
     }
     }
 
 
@@ -282,6 +239,12 @@ class CLScene extends scene {
     // 在使用Atv时Id对应:e.target.id
     // 在使用Atv时Id对应:e.target.id
     // 非使用Atv是Id对应:e.target.id
     // 非使用Atv是Id对应:e.target.id
     onOK(e) {
     onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
+
         // 进入购物车场景
         // 进入购物车场景
         if (e.target.con.classList.contains('shopping-cart-btn-frame')) {
         if (e.target.con.classList.contains('shopping-cart-btn-frame')) {
             this.showScene(require('./ShopCartScene.js'), {});
             this.showScene(require('./ShopCartScene.js'), {});
@@ -297,9 +260,6 @@ class CLScene extends scene {
         if (this.sceneType == 'periphery') {
         if (this.sceneType == 'periphery') {
             this.showScene(require('./GlobalGoodDetailScene.js'), { id });
             this.showScene(require('./GlobalGoodDetailScene.js'), { id });
             return;
             return;
-        } else if (this.sceneType == 'training') {
-            this.showScene(require('./TrainingScene.js'), { id, imgList: this.trainingMap[id] });
-            return;
         }
         }
         // 进入课程详情场景
         // 进入课程详情场景
         this.showScene(require(`./CourseScene.js`), { id });
         this.showScene(require(`./CourseScene.js`), { id });

+ 30 - 59
src/stage/index/scene/CourseScene.js

@@ -5,6 +5,7 @@ import efMarquee from '../../../component/EFMarquee';
 import ShopCartState from '../../../util/ShopCartState';
 import ShopCartState from '../../../util/ShopCartState';
 import NotificationCenter from '../../../util/NotificationCenter';
 import NotificationCenter from '../../../util/NotificationCenter';
 import {CommandBus, CMD_TYPE} from '../../../util/CommandBus';
 import {CommandBus, CMD_TYPE} from '../../../util/CommandBus';
+import WinBoxAPI from '../../../util/WinBoxAPI';
 import Consts from '../../../util/Consts';
 import Consts from '../../../util/Consts';
 
 
 class CourseScene extends scene {
 class CourseScene extends scene {
@@ -19,9 +20,9 @@ class CourseScene extends scene {
 		this.id = 1;
 		this.id = 1;
 		this.isFirst = true;
 		this.isFirst = true;
 		this.marquee = null;
 		this.marquee = null;
-	    //course name
-	    this.title = '';
-	    this.isBought = false;
+    //course name
+    this.title = '';
+    this.isBought = false;
 	}
 	}
 
 
 	generateCourseDetailTitle(itemTitle, secondTitle){
 	generateCourseDetailTitle(itemTitle, secondTitle){
@@ -243,31 +244,20 @@ class CourseScene extends scene {
 	/**
 	/**
 	 * 添加课程下载任务
 	 * 添加课程下载任务
 	 */
 	 */
-	addLessonDownloadTask({resData, courseID, courseName, lessonID, lessonName}){
-		let { images, videos } = this.getDownloadTargetFromLessonData(resData);
-		let lessonDownloadData = {
-			courseID,
-			courseName,
-			lessonID,
-			lessonName,
-			images,
-			videos,
-		}
-		console.log('下载数据...', lessonDownloadData);
-	    //send to download
-	    let {status} = CommandBus.execute({type:CMD_TYPE.DOWNLOAD_LESSON_POST, payload:lessonDownloadData});
-	    //统计下载行为
-	    CommandBus.execute({type:CMD_TYPE.APP_BHV_POST, payload:{
-			eventName: "downloadLesson",
-			eventPage: "courseScene",
-			eventAttr: {
-				courseId:courseID,
-				courseName:courseName,
-				lessonId:lessonID,
-				lessonName:lessonName
+	addLessonDownloadTask({lessonID, courseID, event}){
+		WinBoxAPI.postDownloadRequest(lessonID, courseID, (isTrue, res) => {
+			if (!isTrue) {
+				TVUtil.Toast.show('本地服务请求失败...', 3000);
+				return;
 			}
 			}
-		}});
-		return true;
+			if (event.target.con.classList.contains('download-btn-lesson-list-ready')) {
+  			event.target.con.classList.add('download-btn-lesson-list-ongoing');
+  			event.target.con.classList.remove('download-btn-lesson-list-ready');
+			} else {
+  			event.target.con.classList.add('download-btn-lesson-icon-ongoing');
+  			event.target.con.classList.remove('download-btn-lesson-icon-ready');
+			}
+		});
 	}
 	}
 
 
 	onCreate(data) {
 	onCreate(data) {
@@ -278,11 +268,6 @@ class CourseScene extends scene {
 			// check course is blank
 			// check course is blank
 			this.renderCourse(this.id);
 			this.renderCourse(this.id);
 		});
 		});
-	    CommandBus.execute({type:CMD_TYPE.APP_BHV_POST, payload:{
-			eventName: "enter_courseScene",
-			eventPage: "courseScene",
-			eventAttr: { courseID: data.id },
-	    }});
 	}
 	}
 
 
 	onResume(data) {
 	onResume(data) {
@@ -346,6 +331,12 @@ class CourseScene extends scene {
 	// 在使用Atv时Id对应:e.target.id
 	// 在使用Atv时Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	onOK(e) {
 	onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            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(课列表)
@@ -360,7 +351,8 @@ class CourseScene extends scene {
 				return;
 				return;
 			}
 			}
 			let title = e.target.con.dataset.name;
 			let title = e.target.con.dataset.name;
-			this.showScene(require('./LessonScene.js'), { id, title, courseId: this.id });
+			let downloadStatus = parseInt(e.target.con.dataset.dload);
+			this.showScene(require('./LessonScene.js'), { id, title, downloadStatus, courseId: this.id });
 			return;
 			return;
 		}
 		}
 
 
@@ -414,43 +406,22 @@ class CourseScene extends scene {
 			let lessonID = e.target.con.dataset.id;
 			let lessonID = e.target.con.dataset.id;
 			let lessonName = e.target.con.dataset.name;
 			let lessonName = e.target.con.dataset.name;
 
 
+			/*调试不启用
 			let lessonSeq = parseInt(e.target.con.dataset.seq);
 			let lessonSeq = parseInt(e.target.con.dataset.seq);
 			if (!this.isAuthorized(lessonSeq)) {
 			if (!this.isAuthorized(lessonSeq)) {
 				TVUtil.Toast.show('购买后方可下载!', 3000);
 				TVUtil.Toast.show('购买后方可下载!', 3000);
 				return;
 				return;
-			}
+			}*/
 
 
+			/* windows不提供此方法
 			if (this.getAvailableBlocks() < 200*1024){
 			if (this.getAvailableBlocks() < 200*1024){
 				//剩余空间小于200M
 				//剩余空间小于200M
 				TVUtil.Toast.show('存储空间不足! 请到下载管理界面删除不需要的课以释放存储空间!', 3000);
 				TVUtil.Toast.show('存储空间不足! 请到下载管理界面删除不需要的课以释放存储空间!', 3000);
 				return;
 				return;
 			}
 			}
+			*/
 
 
-			//get courseware via Lesson
-			console.error('DEBUG, download cmd begin');
-			APIClient.getWareList(lessonID, courseID, (isTrue, res) => {
-				if (!isTrue) { return; }
-				if (!res.success) {
-					TVUtil.Toast.show('获取课件列表失败!', 1500);
-					return;
-				}
-				let resData = res.data.list;
-				if (!resData){
-					console.log('Cannot Get coursewares, lessonID=%s', lessonID);
-					return;
-				}
-
-	      if (this.addLessonDownloadTask({resData, courseID, courseName, lessonID, lessonName})){
-					//set download-btn to ongoing
-					if (e.target.con.classList.contains('download-btn-lesson-list-ready')) {
-	    			e.target.con.classList.add('download-btn-lesson-list-ongoing')
-	    			e.target.con.classList.remove('download-btn-lesson-list-ready')
-					} else {
-	    			e.target.con.classList.add('download-btn-lesson-icon-ongoing')
-	    			e.target.con.classList.remove('download-btn-lesson-icon-ready')
-					}
-	      }
-			});//APIClient Over
+			this.addLessonDownloadTask({ lessonID, courseID, event: e });
 		}
 		}
 	}
 	}
 
 

+ 5 - 2
src/stage/index/scene/DataBuildingScene.js

@@ -27,8 +27,11 @@ class DataBuildingScene extends scene {
 
 
     }
     }
 
 
-    onOk() {
-
+    onOK(e) {
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
     }
     }
 
 
     onActive() {
     onActive() {

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

@@ -27,7 +27,7 @@ class DelConfirmScene extends scene {
 			this.moye.root.getWidgetById('cancle-btn').focus();
 			this.moye.root.getWidgetById('cancle-btn').focus();
 			// 记录下课id
 			// 记录下课id
 			this.store = {
 			this.store = {
-				lessonID: data.lessonID,
+				lessonId: data.lessonId,
 				parentScene: data.parentScene,
 				parentScene: data.parentScene,
 			};
 			};
 		});
 		});

+ 87 - 70
src/stage/index/scene/DownloadManagerScene.js

@@ -1,6 +1,7 @@
 import Consts from '../../../util/Consts';
 import Consts from '../../../util/Consts';
+import APIClient from '../../../util/API/APIClient';
+import WinBoxAPI from '../../../util/WinBoxAPI';
 import Utils from '../../../util/Utils';
 import Utils from '../../../util/Utils';
-import {CommandBus, CMD_TYPE} from '../../../util/CommandBus';
 
 
 class DownloadManagerScene extends scene {
 class DownloadManagerScene extends scene {
     constructor(scope) {
     constructor(scope) {
@@ -9,6 +10,65 @@ class DownloadManagerScene extends scene {
         this.lessonItems = {};
         this.lessonItems = {};
     }
     }
 
 
+    fetchDownloadList() {
+      APIClient.getUserDownloadList((isTrue, res) => {
+        // 判断响应内容
+        if (!isTrue || !res || !res.success) {
+          TVUtil.Toast.show('获取下载内容失败', 2000);
+          return;
+        };
+        // 遍历下载列表数据
+        const downloadedList = res.data || [];
+        let recs = [];
+        for (let i in downloadedList) {
+          recs.push(downloadedList[i]);
+          let item = downloadedList[i];
+          // 记录lessonId
+          this.lessonIds = [];
+          this.lessonIds.push(item['lessonId']);
+          // make a map of lessonId to courseId
+          this.lessonItems[item['lessonId']] = {
+              'lessonName':item['lessonName'],
+              'courseId':item['courseId'],
+              'downloadStatus':item['downloadStatus'],
+          }
+        }
+        let downloadStatusTableHtml = this.generateDownloadStatusTable({recs});
+        let downloadStatusTableWrapper = document.getElementById('download-status-table-wrapper');
+        downloadStatusTableWrapper.innerHTML = downloadStatusTableHtml;
+        this.moye.root.reRender();
+      })
+    }
+
+    deleteDownloadFile(lessonId, courseId) {
+      WinBoxAPI.deleteDownloadFile(lessonId, courseId, (isTrue, res) => {
+        if (!isTrue || !res || !res.success) {
+          TVUtil.Toast.show('本地文件删除失败', 2000);
+          return;
+        }
+        //删除dom节点
+        let curNode = document.getElementById('lesson-download-record-'+lessonId);
+        curNode.parentNode.removeChild(curNode);
+        this.moye.root.reRender();
+        //找兄弟结点
+        let findIdx = this.lessonIds.indexOf(lessonId);
+        if(-1 == findIdx){
+            return;
+        }
+        this.lessonIds.splice(findIdx, 1);
+        if(findIdx >= this.lessonIds.length){
+            findIdx = this.lessonIds.length - 1;
+        }
+        let nextFocusLessonId = null;
+        if(findIdx >= 0){
+            nextFocusLessonId = this.lessonIds[findIdx];
+        }
+        if(nextFocusLessonId){
+          this.moye.root.getWidgetById('del-btn-lesson-'+nextFocusLessonId).focus();
+        }
+      });
+    }
+
     generateDownloadStatusTable({recs}) {
     generateDownloadStatusTable({recs}) {
         let trAcc = '';
         let trAcc = '';
         let count = 0;
         let count = 0;
@@ -19,13 +79,12 @@ class DownloadManagerScene extends scene {
                 feCfg = "default_focus:yes";
                 feCfg = "default_focus:yes";
             }
             }
             count += 1;
             count += 1;
-            //for tmp
 
 
             //downloadDate
             //downloadDate
             let downloadDateStr = '2017-09-10';
             let downloadDateStr = '2017-09-10';
-            if (rec.createTime) {
+            if (rec.gmtCreated) {
                 let createDate = new Date();
                 let createDate = new Date();
-                createDate.setTime(rec.createTime);
+                createDate.setTime(rec.gmtCreated);
                 downloadDateStr = Utils.dateFormat(createDate, 'yyyy-MM-dd');
                 downloadDateStr = Utils.dateFormat(createDate, 'yyyy-MM-dd');
             }
             }
             let downloadStatus = rec['downloadStatus'];
             let downloadStatus = rec['downloadStatus'];
@@ -33,8 +92,8 @@ class DownloadManagerScene extends scene {
 
 
             //storageUsage
             //storageUsage
             let storageUsageStr = '';
             let storageUsageStr = '';
-            if (rec.storageUsage){
-                storageUsageStr = '' + parseInt(rec.storageUsage/1000) + 'M';
+            if (rec.storageUsage || 0){
+                storageUsageStr = '' + parseInt((rec.storageUsage || 0)/1000) + 'M';
             }
             }
 
 
             //downloadStatus
             //downloadStatus
@@ -43,7 +102,6 @@ class DownloadManagerScene extends scene {
                 downloadDesc = '未下载';
                 downloadDesc = '未下载';
                 break;
                 break;
             case Consts.DOWNLOAD_STATUS_ONGOING:
             case Consts.DOWNLOAD_STATUS_ONGOING:
-                //downloadDesc = '已下载'+rec['progress']*100 + '%';
                 downloadDesc = '正在下载';
                 downloadDesc = '正在下载';
                 break;
                 break;
             case Consts.DOWNLOAD_STATUS_SUCCESS:
             case Consts.DOWNLOAD_STATUS_SUCCESS:
@@ -59,7 +117,7 @@ class DownloadManagerScene extends scene {
                 rec['lessonName'] = rec['courseName'];
                 rec['lessonName'] = rec['courseName'];
             }
             }
 
 
-            trAcc += `<div id='lesson-download-record-${rec['lessonID']}' class="row" lesson_id="${rec['lessonID']}">
+            trAcc += `<div id='lesson-download-record-${rec['lessonId']}' class="row" lesson_id="${rec['lessonId']}">
             <div class="one">${downloadDateStr}</div>
             <div class="one">${downloadDateStr}</div>
             <div class="two">${rec['courseName']}</div>
             <div class="two">${rec['courseName']}</div>
             <div class="three">${rec['lessonName']}</div>
             <div class="three">${rec['lessonName']}</div>
@@ -67,17 +125,15 @@ class DownloadManagerScene extends scene {
             <div class="five">${downloadDesc}</div>
             <div class="five">${downloadDesc}</div>
             <div class="six" >
             <div class="six" >
               <div id="download-btn-wrapper" fe-fole="Switch">
               <div id="download-btn-wrapper" fe-fole="Switch">
-                <div id="enter-btn-lesson-${rec['lessonID']}" class="download-enter-btn" fe-role="Widget" data-id="${rec['lessonID']}">
+                <div id="enter-btn-lesson-${rec['lessonId']}" class="download-enter-btn" fe-role="Widget" data-id="${rec['lessonId']}">
                   <img src="./assets/img/DownloadScene/download_enter_btn.png" class="img-btn"/>
                   <img src="./assets/img/DownloadScene/download_enter_btn.png" class="img-btn"/>
                 </div>
                 </div>
-                <div id="del-btn-lesson-${rec['lessonID']}" class="download-del-btn" fe-role="Widget" data-id="${rec['lessonID']}" >
+                <div id="del-btn-lesson-${rec['lessonId']}" class="download-del-btn" fe-role="Widget" data-id="${rec['lessonId']}" >
                   <img src="./assets/img/DownloadScene/download_del_btn.png" class="img-btn"/>
                   <img src="./assets/img/DownloadScene/download_del_btn.png" class="img-btn"/>
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
             </div>`
             </div>`
-            //<div class="delete-btn"  fe-role="Widget" fe-cfg="${feCfg}"/>
-            //<img src="./assets/img/download_del_btn.png" />
         }
         }
         let header = `<div class="row header">
         let header = `<div class="row header">
           <div class="one">下载日期</div>
           <div class="one">下载日期</div>
@@ -97,71 +153,26 @@ class DownloadManagerScene extends scene {
             recs.push({
             recs.push({
               'date':'2017-09-01',
               'date':'2017-09-01',
               'courseName':'同步辅导语文一年级上'+i,
               'courseName':'同步辅导语文一年级上'+i,
-              'courseID':'course-'+i,
+              'courseId':'course-'+i,
               'lessonName':'悯农',
               'lessonName':'悯农',
-              'lessonID':'lesson-'+i,
+              'lessonId':'lesson-'+i,
               'downloadStatus':'下载完成',
               'downloadStatus':'下载完成',
               'createTime':1505187194,
               'createTime':1505187194,
               'storageUsage':150211,
               'storageUsage':150211,
             });
             });
           }
           }
           */
           */
-        let {status, data, error} = CommandBus.execute({type:CMD_TYPE.DOWNLOAD_ALL_LESSON_STATUS_GET, payload:{}});
-        let recs = [];
-        if (!status && data && data.recs){
-            recs = data.recs;
-        }
-
-        this.lessonIds = [];
-        for(let idx in recs){
-            let item = recs[idx];
-            this.lessonIds.push(item['lessonID']);
-
-            // make a map of lessonID to courseID
-            this.lessonItems[item['lessonID']] = {
-                'lessonName':item['lessonName'],
-                'courseID':item['courseID'],
-            }
-        }
-
-        //TVUtil.Toast.show(JSON.stringify({status,data, error, recs}), 5000);
         this.setContentView(require('../../../res/tpl/DownloadScene.tpl'), {}, 'DownloadManagerScene', {}, () => {
         this.setContentView(require('../../../res/tpl/DownloadScene.tpl'), {}, 'DownloadManagerScene', {}, () => {
-            let downloadStatusTableHtml = this.generateDownloadStatusTable({recs});
-            let downloadStatusTableWrapper = document.getElementById('download-status-table-wrapper');
-            downloadStatusTableWrapper.innerHTML = downloadStatusTableHtml;
-            this.moye.root.reRender();
+          this.fetchDownloadList();
         });
         });
     }
     }
 
 
     onResume(retData) {
     onResume(retData) {
       if (!retData) return;
       if (!retData) return;
       //send delete cmd
       //send delete cmd
-      let lessonID = retData.lessonID;
-      let {status, data} = CommandBus.execute({type:CMD_TYPE.DOWNLOAD_LESSON_DELETE, payload:{lessonID}});
-      //delete dom node
-
-      //if(0 == status){
-      let curNode = document.getElementById('lesson-download-record-'+lessonID);
-      curNode.parentNode.removeChild(curNode);
-      //}
-
-      this.moye.root.reRender();
-      //找兄弟结点
-      let findIdx = this.lessonIds.indexOf(lessonID);
-      if(-1 == findIdx){
-          return;
-      }
-      this.lessonIds.splice(findIdx, 1);
-      if(findIdx >= this.lessonIds.length){
-          findIdx = this.lessonIds.length - 1;
-      }
-      let nextFocusLessonId = null;
-      if(findIdx >= 0){
-          nextFocusLessonId = this.lessonIds[findIdx];
-      }
-      if(nextFocusLessonId){
-        this.moye.root.getWidgetById('del-btn-lesson-'+nextFocusLessonId).focus();
-      }
+      let lessonId = retData.lessonId;
+      let courseId = this.lessonItems[lessonId]['courseId']
+      this.deleteDownloadFile(lessonId, courseId)
     }
     }
 
 
     onPause() {
     onPause() {
@@ -181,17 +192,23 @@ class DownloadManagerScene extends scene {
     }
     }
 
 
     onOK(e) {
     onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
         if(e.target.con.classList.contains('download-del-btn')){
         if(e.target.con.classList.contains('download-del-btn')){
-            let lessonID = e.target.con.dataset.id;
-            let title = this.lessonItems[lessonID].lessonName;
+            let lessonId = e.target.con.dataset.id;
+            let title = this.lessonItems[lessonId].lessonName;
             let parentScene = 'DownloadManagerScene';
             let parentScene = 'DownloadManagerScene';
-            this.showScene(require('./DelConfirmScene.js'), { parentScene, lessonID, title });
+            this.showScene(require('./DelConfirmScene.js'), { parentScene, lessonId, title });
         } else if (e.target.con.classList.contains('download-enter-btn')) {
         } else if (e.target.con.classList.contains('download-enter-btn')) {
-            let lessonID = e.target.con.dataset.id;
-            let courseID = this.lessonItems[lessonID].courseID;
-            let lessonName = this.lessonItems[lessonID].lessonName;
+            let lessonId = e.target.con.dataset.id;
+            let courseId = this.lessonItems[lessonId].courseId;
+            let lessonName = this.lessonItems[lessonId].lessonName;
+            let downloadStatus = this.lessonItems[lessonId].downloadStatus;
             // enter relative lesson scene
             // enter relative lesson scene
-            this.showScene(require('./LessonScene.js'), {id:lessonID, courseId:courseID, title:lessonName});
+            this.showScene(require('./LessonScene.js'), {courseId, downloadStatus, id:lessonId, title:lessonName});
         }
         }
     }
     }
 
 

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

@@ -156,6 +156,12 @@ class GlobalGoodDetailScene extends scene {
     // 在使用Atv时Id对应:e.target.id
     // 在使用Atv时Id对应:e.target.id
     // 非使用Atv是Id对应:e.target.id
     // 非使用Atv是Id对应:e.target.id
     onOK(e) {
     onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
+        
         if (e.target.con.classList.contains('item')) {
         if (e.target.con.classList.contains('item')) {
             let targetId = e.target.id.split('-')[2];
             let targetId = e.target.id.split('-')[2];
             // targetId = 6;
             // targetId = 6;

+ 64 - 19
src/stage/index/scene/ImageWareFullScreenScene.js

@@ -1,8 +1,15 @@
 import Consts from '../../../util/Consts';
 import Consts from '../../../util/Consts';
 
 
+function getLocalResourceUrl(absoluteUrl) {
+  if (!absoluteUrl) return;
+  const segments = absoluteUrl.split('/') || [];
+  return `${Consts.NODE_SERVER}/lesson/readFile?n=${segments.slice(3).join('*')}`;
+}
+
 class ImageWareFullScreenScene extends scene {
 class ImageWareFullScreenScene extends scene {
 	constructor(scope) {
 	constructor(scope) {
 		super(scope);
 		super(scope);
+		this.isDownload = false;
 		this.wareList = [];
 		this.wareList = [];
 		this.curWareIndex = 0;
 		this.curWareIndex = 0;
 		this.curWareType = null;
 		this.curWareType = null;
@@ -12,7 +19,11 @@ class ImageWareFullScreenScene extends scene {
 
 
 	renderImageView() {
 	renderImageView() {
 		const curImage = this.curImageList[this.curImageIndex];
 		const curImage = this.curImageList[this.curImageIndex];
-		document.getElementById('wareImg').setAttribute('src', curImage.url);
+		if (this.isDownload) {
+			document.getElementById('wareImg').setAttribute('src', getLocalResourceUrl(curImage.url));
+		} else {
+			document.getElementById('wareImg').setAttribute('src', curImage.url);
+		}
 	}
 	}
 
 
 	dynamicChangeWare(wareIndex, type) {
 	dynamicChangeWare(wareIndex, type) {
@@ -63,46 +74,67 @@ class ImageWareFullScreenScene extends scene {
 		const hasNextWare = this.curWareIndex < this.wareList.length - 1 ? true : false;
 		const hasNextWare = this.curWareIndex < this.wareList.length - 1 ? true : false;
 		//当前图片是该图片课件最后一张图片,且后边还有课件则切换课件
 		//当前图片是该图片课件最后一张图片,且后边还有课件则切换课件
 		if (this.curImageIndex === this.curImageList.length - 1 && hasNextWare) {
 		if (this.curImageIndex === this.curImageList.length - 1 && hasNextWare) {
-			const nextWareIndex = this.curWareIndex + 1;
-			this.dynamicChangeWare(nextWareIndex, 'NEXT')
+			// const nextWareIndex = this.curWareIndex + 1;
+			// this.dynamicChangeWare(nextWareIndex, 'NEXT')
+			return;
 		//当前图片是该图片课件最后一张图片,且后边没有课件,给出提示
 		//当前图片是该图片课件最后一张图片,且后边没有课件,给出提示
 		} else if (this.curImageIndex === this.curImageList.length - 1 && !hasNextWare) {
 		} else if (this.curImageIndex === this.curImageList.length - 1 && !hasNextWare) {
-			TVUtil.Toast.show('已经是最后一个课件了', 2000);
+			// TVUtil.Toast.show('已经是最后一个课件了', 2000);
+			return;
 		//当前图片不是该图片课件的最后一张图片
 		//当前图片不是该图片课件的最后一张图片
-    	} else {
+  	} else {
 			this.curImageIndex += 1;
 			this.curImageIndex += 1;
 			this.renderImageView();
 			this.renderImageView();
-    	}
+			if (this.curImageIndex === this.curImageList.length - 1) {
+				document.getElementById('imgRight').style.display = 'none';
+			}
+			if (this.curImageIndex === 1) {
+				document.getElementById('imgLeft').style.display = 'block';
+			}
+  	}
 	}
 	}
 
 
 	keyLeftHandler() {
 	keyLeftHandler() {
 		const hasPreviousWare = this.curWareIndex === 0 ? false : true;
 		const hasPreviousWare = this.curWareIndex === 0 ? false : true;
 		//当前图片是该图片课件的第一张图片,且前边还有课件
 		//当前图片是该图片课件的第一张图片,且前边还有课件
-	    if (this.curImageIndex == 0 && hasPreviousWare) {
-			const previousWareIndex = this.curWareIndex - 1;
-			this.dynamicChangeWare(previousWareIndex, 'BACK');
+	  if (this.curImageIndex == 0 && hasPreviousWare) {
+			// const previousWareIndex = this.curWareIndex - 1;
+			// this.dynamicChangeWare(previousWareIndex, 'BACK');
+			return;
 		//当前图片是该图片课件的第一张图片,且前边没有课件,则给出提示
 		//当前图片是该图片课件的第一张图片,且前边没有课件,则给出提示
 		} else if (this.curImageIndex === 0 && !hasPreviousWare) {
 		} else if (this.curImageIndex === 0 && !hasPreviousWare) {
-			TVUtil.Toast.show('已经是第一个课件了', 2000);
+			// TVUtil.Toast.show('已经是第一个课件了', 2000);
+			return;
 		//当前图片不是该图片课件的第一张图片
 		//当前图片不是该图片课件的第一张图片
 		} else {
 		} else {
 			this.curImageIndex -= 1;
 			this.curImageIndex -= 1;
 			this.renderImageView();
 			this.renderImageView();
+			if (this.curImageIndex === 0) {
+				document.getElementById('imgLeft').style.display = 'none';
+			}
+			if (this.curImageIndex === this.curImageList.length - 2) {
+				document.getElementById('imgRight').style.display = 'block';
+			}
 		}
 		}
 	}
 	}
 
 
 	onCreate(data) {
 	onCreate(data) {
-	    this.wareList = data.wareList;
-	    this.curWareIndex = data.curWareIndex;
-	    if (data.curImageList) {
+		this.isDownload = data.isDownload;
+    this.wareList = data.wareList;
+    this.curWareIndex = data.curWareIndex;
+    if (data.curImageList) {
 			this.curImageList = data.curImageList;
 			this.curImageList = data.curImageList;
-	    }
-	    if (data.curImageIndex) {
+    }
+    if (data.curImageIndex) {
 			this.curImageIndex = data.curImageIndex;
 			this.curImageIndex = data.curImageIndex;
-	    }
-	    this.curWareType = this.wareList[this.curWareIndex].type;
+    }
+    this.curWareType = this.wareList[this.curWareIndex].type;
 		this.setContentView(require('../../../res/tpl/ImageWareFullScreen.tpl'), {}, 'ImageWareFullScreen', {}, () => {
 		this.setContentView(require('../../../res/tpl/ImageWareFullScreen.tpl'), {}, 'ImageWareFullScreen', {}, () => {
 			this.renderImageView();
 			this.renderImageView();
+			document.getElementById('imgLeft').style.display = 'none';
+			if (this.curImageList.length === 1) {
+				document.getElementById('imgRight').style.display = 'none';
+			}
 		});
 		});
 	}
 	}
 
 
@@ -126,8 +158,21 @@ class ImageWareFullScreenScene extends scene {
 
 
 	}
 	}
 
 
-	onOK() {
-
+	onOK(e) {
+    // 后退
+    if (e.target.con.classList.contains('goback')) {
+			this.hideScene({
+				curWareIndex: this.curWareIndex,
+				curImageList: this.curImageList,
+				curImageIndex: this.curImageIndex,
+			}, 'LessonScene');
+      return;
+    }
+		if (e.target.id === 'imgLeft') {
+			this.keyLeftHandler();
+		} else if (e.target.id === 'imgRight') {
+			this.keyRightHandler();
+		}
 	}
 	}
 
 
 	onBack() {
 	onBack() {

+ 1 - 0
src/stage/index/scene/IndexScene.js

@@ -148,6 +148,7 @@ class IndexScene extends scene {
 			if (type == 'download') {
 			if (type == 'download') {
 				this.showScene(require('./DownloadManagerScene.js'), {});
 				this.showScene(require('./DownloadManagerScene.js'), {});
 			} else {
 			} else {
+				//点击CLScene 是否为师训
 				this.showScene(require('./CLScene.js'), { type });
 				this.showScene(require('./CLScene.js'), { type });
 			}
 			}
 		} else if (e.target.con.classList.contains('user-info')) {
 		} else if (e.target.con.classList.contains('user-info')) {

+ 417 - 157
src/stage/index/scene/LessonScene.js

@@ -1,8 +1,8 @@
 import APIClient from '../../../util/API/APIClient';
 import APIClient from '../../../util/API/APIClient';
+import WinBoxAPI from '../../../util/WinBoxAPI';
 import Consts from '../../../util/Consts';
 import Consts from '../../../util/Consts';
 import Utils from '../../../util/Utils';
 import Utils from '../../../util/Utils';
-import HlsVideoPlugin from '../../../util/HlsVideoPlugin';
-import {CommandBus, CMD_TYPE} from '../../../util/CommandBus';
+import EfunVideoPlayer from '../../../util/EfunVideoPlayer';
 
 
 function matchWare(wareList, wareId) {
 function matchWare(wareList, wareId) {
     const matchedWareList = wareList.filter((ware) => {
     const matchedWareList = wareList.filter((ware) => {
@@ -16,7 +16,22 @@ function matchWare(wareList, wareId) {
     return false;
     return false;
 }
 }
 
 
+function checkDownloadStatus(status) {
+  if (status === Consts.DOWNLOAD_STATUS_SUCCESS) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
+function getLocalResourceUrl(absoluteUrl) {
+  if (!absoluteUrl) return;
+  const segments = absoluteUrl.split('/') || [];
+  return `${Consts.NODE_SERVER}/lesson/readFile?n=${segments.slice(3).join('*')}`;
+}
+
 class LessonScene extends scene {
 class LessonScene extends scene {
+<<<<<<< HEAD
     constructor(scope) {
     constructor(scope) {
         super(scope);
         super(scope);
         this.timer = null;        //记录定时器
         this.timer = null;        //记录定时器
@@ -39,64 +54,88 @@ class LessonScene extends scene {
         	height: 603,
         	height: 603,
         };
         };
     }
     }
+=======
+  constructor(scope) {
+    super(scope);
+    this.timer = null;        //记录定时器
+    this.isBack = false;      //是否返回上个场景
+    this.videoPlayer = null;  //视频播放器
+    this.isDownload = false;  //是否已下载
+    this.courseId = null;     //记录课程ID
+    this.lessonId = null;     //记录课ID
+    this.wareList = null;     //记录课件列表
+    this.curWareId = null;    //当前课件的id
+    this.curWareType = null;  //当前课件的类型
+    this.curWareIndex = 0;    //当前课件在课件列表中的索引
+    this.curImageList = null; //当前图片课件的图片列表
+    this.curImageIndex = null;//当前图片在列表中的索引
+    this.videoPosition = {
+    	top: 270,
+    	left: 790,
+    	width: 1072,
+    	height: 603,
+    };
+  }
+>>>>>>> remotes/origin/dev_winpc_touch
 
 
-    /**
-    * 根据课程id及课id请求课件列表
-    */
-    loadWareList() {
-        APIClient.getWareList(this.lessonId, this.courseId, (isTrue, response) => {
-        	if (!isTrue) { return; }
-        	if (!response.success) {
-        		TVUtil.Toast.show('获取课件列表失败!', 1500);
-                return;
-        	}
-        	if (response.data && response.data.list && response.data.list.length > 0) {
-        		this.renderWareList(response.data.list);
-        		this.wareList = response.data.list;
-        	} else {
-        		this.hideScene();
-        		this.showScene(require('./DataBuildingScene'), {});
-        	}
-        });
-    }
+  /**
+  * 根据课程id及课id请求课件列表
+  */
+  loadWareList() {
+    APIClient.getWareList(this.lessonId, this.courseId, (isTrue, response) => {
+    	if (!isTrue) { return; }
+    	if (!response.success) {
+    		TVUtil.Toast.show('获取课件列表失败!', 1500);
+            return;
+    	}
+    	if (response.data && response.data.list && response.data.list.length > 0) {
+    		this.renderWareList(response.data.list);
+    		this.wareList = response.data.list;
+    	} else {
+    		this.hideScene();
+    		this.showScene(require('./DataBuildingScene'), {});
+    	}
+    });
+  }
 
 
-    /**
-    * 把课件列表进行渲染
-    */
-    renderWareList(dataset) {
-    	let listDom = document.getElementById('list-content');
-    	dataset.forEach(function(item, index) {
-    		const { id, type } = item;
-
-    		let itemDom = document.createElement('div');
-    		itemDom.setAttribute('id', `item-${type}-${id}-${index}`);
-    		itemDom.setAttribute('class', 'ware-item');
-    		itemDom.setAttribute('fe-role', 'Widget');
-    		itemDom.innerHTML = this.createHTMLString(item);
-    		listDom.appendChild(itemDom);
-    		if (index === 0) {
-    			this.curWareType = parseInt(type);
-    			this.curWareId = id;
-    			this.createRightView(item);
-    		}
-    	}.bind(this));
-
-    	let listScroll = this.moye.root.getWidgetById('list');
-    	listScroll.on('focus', e => {
-    		if (this.curWareId === e.target.id.split('-')[2]) {
-    			return;
-    		}
-    		this.curWareId = e.target.id.split('-')[2]
-    		this.curWareType = parseInt(e.target.id.split('-')[1]);
-    		this.curWareIndex = parseInt(e.target.id.split('-')[3]);
-            let curWare = matchWare(this.wareList, this.curWareId);
-            if (curWare) {
-                this.createRightView(curWare);
-            }
-    	});
-    	this.moye.root.reRender();
-    }
+  /**
+  * 把课件列表进行渲染
+  */
+  renderWareList(dataset) {
+  	let listDom = document.getElementById('list-content');
+  	dataset.forEach(function(item, index) {
+  		const { id, type } = item;
 
 
+  		let itemDom = document.createElement('div');
+  		itemDom.setAttribute('id', `item-${type}-${id}-${index}`);
+  		itemDom.setAttribute('class', 'ware-item');
+  		itemDom.setAttribute('fe-role', 'Widget');
+  		itemDom.innerHTML = this.createHTMLString(item);
+  		listDom.appendChild(itemDom);
+  		if (index === 0) {
+  			this.curWareType = parseInt(type);
+  			this.curWareId = id;
+  			this.createRightView(item);
+  		}
+  	}.bind(this));
+
+  	let listScroll = this.moye.root.getWidgetById('list');
+  	listScroll.on('focus', e => {
+  		if (this.curWareId === e.target.id.split('-')[2]) {
+  			return;
+  		}
+  		this.curWareId = e.target.id.split('-')[2]
+  		this.curWareType = parseInt(e.target.id.split('-')[1]);
+  		this.curWareIndex = parseInt(e.target.id.split('-')[3]);
+      let curWare = matchWare(this.wareList, this.curWareId);
+      if (curWare) {
+          this.createRightView(curWare);
+      }
+  	});
+  	this.moye.root.reRender();
+  }
+
+<<<<<<< HEAD
     /**
     /**
     * 创建左侧列表项内容
     * 创建左侧列表项内容
     */
     */
@@ -123,18 +162,99 @@ class LessonScene extends scene {
                 	<img class="ware-icon-content" src="${item.icon}">
                 	<img class="ware-icon-content" src="${item.icon}">
                 </div>
                 </div>
               </div>
               </div>
+=======
+  /**
+  * 创建左侧列表项内容
+  */
+  createHTMLString(data) {
+  	let item = {
+  		text: data.category || '',
+  		icon: '',
+  	}
+  	switch (data.type) {
+  		case Consts.TYPE_IMAGE:
+  			item.icon = 'assets/img/LessonScene/img.png';
+  			break;
+  		case Consts.TYPE_VIDEO:
+  			item.icon = 'assets/img/LessonScene/video.png';
+  			break;
+  	}
+  	return `
+      <div class="ware-item-frame">
+        <div class="ware-type">${item.text}</div>
+        <div class="ware-desc">
+          <div class="ware-names">${data.title}</div>
+          <div class="ware-icon">
+          	<img class="ware-icon-content" src="${item.icon}">
+          </div>
+        </div>
+      </div>
+    `;
+  }
+
+  /**
+  * 创建右侧视窗
+  */
+  createRightView(item) {
+    // 清一下定时器
+    window.clearInterval(this.timer);
+    this.timer = null;
+
+    const { title, type, list } = item;
+    //设定视窗的标题
+    document.getElementById('view-top').innerHTML = title;
+    //关闭安卓播放器
+  	if (window.efunbox) {
+  		window.efunbox.closePlayer();
+  	}
+  	switch (type) {
+  		case Consts.TYPE_VIDEO:
+  			let playUrl = '';
+  			if (list && list.length >= 1) {
+  				playUrl = Utils.videoUrlFormat(list[0].url);
+  			}
+        /*
+  			let videoViewDom =
+          `
+            <div id="view-full-screen" fe-role="Widget" class="view-full-screen-video">
+            </div>
+            <div id="view-video-start" fe-role="Widget">
+              <div class="transparent-btn">播放</div>
+>>>>>>> remotes/origin/dev_winpc_touch
             </div>
             </div>
           `;
           `;
-    }
-
-    /**
-    * 创建右侧视窗
-    */
-    createRightView(item) {
-        // 清一下定时器
-        window.clearInterval(this.timer);
-        this.timer = null;
+        */
+        let videoViewDom = '';
+  			document.getElementById('view-bottom').innerHTML = videoViewDom;
+  			this.moye.root.reRender();
+  			this.renderVideoView(title, playUrl, type);
+  			break;
+  		case Consts.TYPE_IMAGE:
+  			let imageViewDom =
+  			`
+  				<div id="view-full-screen" fe-role="Widget" class="view-full-screen-img"></div>
+  				<div id="view-previous" fe-role="Widget">
+            <div class="transparent-btn">上一页</div>
+          </div>
+  				<div id="view-page">1/1</div>
+            <div id="view-next" fe-role="Widget">
+            <div class="transparent-btn">下一页</div>
+          </div>
+  			`;
+  			document.getElementById('view-bottom').innerHTML = imageViewDom;
+  			this.moye.root.reRender();
+  			this.curImageList = list;
+  			if (this.curImageList.length > 0) {
+  				this.curImageIndex = 0;
+  				this.renderImageView();
+  			}
+  			break;
+          default:
+              break;
+  	}
+  }
 
 
+<<<<<<< HEAD
         const { title, type, list } = item;
         const { title, type, list } = item;
         //设定视窗的标题
         //设定视窗的标题
         document.getElementById('view-top').innerHTML = title;
         document.getElementById('view-top').innerHTML = title;
@@ -203,8 +323,22 @@ class LessonScene extends scene {
             default:
             default:
                 break;
                 break;
     	}
     	}
+=======
+  /**
+  * 渲染图片视图
+  */
+  renderImageView() {
+  	const curImage = this.curImageList[this.curImageIndex];
+  	document.getElementById('view-page').innerHTML = (this.curImageIndex + 1) + '/' + this.curImageList.length;
+    let imageDom = `<img src=${curImage.url} />`
+    if (this.isDownload) {
+      imageDom = `<img src=${getLocalResourceUrl(curImage.url)} />`
+>>>>>>> remotes/origin/dev_winpc_touch
     }
     }
+  	document.getElementById('view-content').innerHTML = imageDom;
+  }
 
 
+<<<<<<< HEAD
     /**
     /**
     * 渲染图片视图
     * 渲染图片视图
     */
     */
@@ -213,8 +347,49 @@ class LessonScene extends scene {
     	document.getElementById('view-page').innerHTML = (this.curImageIndex + 1) + '/' + this.curImageList.length;
     	document.getElementById('view-page').innerHTML = (this.curImageIndex + 1) + '/' + this.curImageList.length;
         const imageDom = `<img src=${curImage.url} />`
         const imageDom = `<img src=${curImage.url} />`
     	document.getElementById('view-content').innerHTML = imageDom;
     	document.getElementById('view-content').innerHTML = imageDom;
+=======
+  /**
+  * 渲染视频视图
+  */
+  renderVideoView(name, url, type) {
+    let localUrl = url;
+    if (this.isDownload) {
+      localUrl = getLocalResourceUrl(url)
+>>>>>>> remotes/origin/dev_winpc_touch
+    }
+    if (window.efunbox) {
+        window.efunbox.initAndroidPlayer(
+        	name,
+        	localUrl,
+        	1, //与android里的音视频类型定义有关,这里写死为type=1
+        	this.videoPosition.top,
+        	this.videoPosition.left,
+        	this.videoPosition.width,
+        	this.videoPosition.height,
+        	false
+        );
+        window.efunbox.start();
+        this.videoPlayer = window.efunbox;
+    } else {
+        const videoDom = `<div id="hls-video"></div>`;
+        document.getElementById('view-content').innerHTML = videoDom;
+        this.videoPlayer = new EfunVideoPlayer();
+        this.videoPlayer.initPlayer(localUrl, 'hls-video');
     }
     }
+  	// 监控到初始化视频成功后暂停画面
+  	this.timer = window.setInterval(() => {
+  		if (this.videoPlayer.playStatus()) {
+  			if(this.videoPlayer.getCurtime() > 1000){
+  				this.videoPlayer.pause();
+  				document.getElementById('view-video-start').innerHTML = '播放';
+  				window.clearInterval(this.timer);
+  				this.timer = null;
+  			}
+  		}
+  	}, 500);
+  }
 
 
+<<<<<<< HEAD
     /**
     /**
      * 渲染音频视图
      * 渲染音频视图
      */
      */
@@ -273,58 +448,55 @@ class LessonScene extends scene {
     * 渲染视频视图
     * 渲染视频视图
     */
     */
     renderVideoView(name, url, type) {
     renderVideoView(name, url, type) {
+=======
+  updateRightView(item) {
+  	const { title, type, list } = item;
+  	document.getElementById('view-top').innerHTML = title;
+  	switch (type) {
+  		case Consts.TYPE_VIDEO:
+  			let playUrl = '';
+  			if (list && list.length >= 1) {
+  				playUrl = Utils.videoUrlFormat(list[0].url);
+  			}
+        /*
+        let playText = '播放';
+        if (this.videoPlayer && this.videoPlayer.playStatus()) {
+            playText = '暂停';
+        }
+  			let videoViewDom =
+          `
+            <div id="view-full-screen" fe-role="Widget" class="view-full-screen-video">
+            </div>
+            <div id="view-video-start" fe-role="Widget">
+              <div class="transparent-btn">${playText}</div>
+            </div>
+          `;
+        */
+  			document.getElementById('view-bottom').innerHTML = '';
+  			this.moye.root.reRender();
+        //如果是H5播放器,则重新创建video标签
+>>>>>>> remotes/origin/dev_winpc_touch
         if (window.efunbox) {
         if (window.efunbox) {
-            window.efunbox.initAndroidPlayer(
-            	name,
-            	url,
-            	1, //与android里的音视频类型定义有关,这里写死为type=1
-            	this.videoPosition.top,
-            	this.videoPosition.left,
-            	this.videoPosition.width,
-            	this.videoPosition.height,
-            	false
-            );
-            window.efunbox.start();
-            this.videoPlayer = window.efunbox;
+            window.efunbox.customScreen(270, 790, 1072, 603);
         } else {
         } else {
-            const videoDom = `<video id="hls-video" controls autoplay>你的浏览器不支持视频播放</video>`;
-            document.getElementById('view-content').innerHTML = videoDom;
-            this.videoPlayer = new HlsVideoPlugin();
-            this.videoPlayer.initH5Player(url, 'hls-video');
+          const videoDom = `<div id="hls-video"></div>`;
+          document.getElementById('view-content').innerHTML = videoDom;
+          this.videoPlayer = new EfunVideoPlayer();
+          this.videoPlayer.initPlayer(playUrl, 'hls-video');
         }
         }
-    	// 监控到初始化视频成功后暂停画面
-    	this.timer = window.setInterval(() => {
-    		if (this.videoPlayer.playStatus()) {
-    			if(this.videoPlayer.getCurtime() > 1000){
-    				this.videoPlayer.pause();
-    				document.getElementById('view-video-start').innerHTML = '播放';
-    				window.clearInterval(this.timer);
-    				this.timer = null;
-    			}
-    		}
-    	}, 500);
-    }
-
-    updateRightView(item) {
-    	const { title, type, list } = item;
-    	document.getElementById('view-top').innerHTML = title;
-    	switch (type) {
-    		case Consts.TYPE_VIDEO:
-    			let playUrl = '';
-    			if (list && list.length >= 1) {
-    				playUrl = Utils.videoUrlFormat(list[0].url);
-    			}
-                let playText = '播放';
-                if (this.videoPlayer && this.videoPlayer.playStatus()) {
-                    playText = '暂停';
-                }
-    			let videoViewDom =
-                `
-                  <div id="view-full-screen" fe-role="Widget" class="view-full-screen-video">
+  			break;
+  		case Consts.TYPE_IMAGE:
+  			let imageViewDom =
+  			`
+  				<div id="view-full-screen" fe-role="Widget" class="view-full-screen-img"></div>
+  				<div id="view-previous" fe-role="Widget">
+                      <div class="transparent-btn">上一页</div>
                   </div>
                   </div>
-                  <div id="view-video-start" fe-role="Widget">
-                    <div class="transparent-btn">${playText}</div>
+  				<div id="view-page">1/1</div>
+  				<div id="view-next" fe-role="Widget">
+                      <div class="transparent-btn">下一页</div>
                   </div>
                   </div>
+<<<<<<< HEAD
                 `;
                 `;
     			document.getElementById('view-bottom').innerHTML = videoViewDom;
     			document.getElementById('view-bottom').innerHTML = videoViewDom;
     			this.moye.root.reRender();
     			this.moye.root.reRender();
@@ -431,28 +603,43 @@ class LessonScene extends scene {
     		(isTrue, res) => {},
     		(isTrue, res) => {},
     	);
     	);
     }
     }
+=======
+  			`;
+  			document.getElementById('view-bottom').innerHTML = imageViewDom;
+  			this.moye.root.reRender();
+  			this.renderImageView();
+  			break;
+      default:
+        break;
+  	}
+  }
 
 
-    onCreate(data) {
-        this.lessonId = data.id;
-        this.courseId = data.courseId;
-        this.setContentView(require('../../../res/tpl/LessonScene.tpl'), {}, 'LessonScene', {}, () => {
-            document.getElementById('title').appendChild(document.createTextNode(data.title));
-            this.loadWareList();
-    		CommandBus.execute({
-    			type: CMD_TYPE.APP_BHV_POST,
-    			payload: {
-    				eventName: "enter_wareScene",
-    				eventPage: "wareScene",
-    				eventAttr: {
-    					courseId: data.courseId,
-    					lessonId: data.id,
-    				}
-                },
-    		});
-          }
-        );
-    }
+  /**
+  * 记录播放行为事件
+  */
+  postPlayRecord(lessonId, courseId, playStopTime=1){
+  	APIClient.putUserAction(
+  		Consts.USER_ACTION_WATCH,
+  		Consts.USER_ACTION_WATCH_NAME,
+  		`${courseId}_${lessonId}`,
+  		playStopTime,
+  		(isTrue, res) => {},
+  	);
+  }
+>>>>>>> remotes/origin/dev_winpc_touch
 
 
+  onCreate(data) {
+    //是否已下载
+    this.isDownload = checkDownloadStatus(data.downloadStatus);
+    this.lessonId = data.id;
+    this.courseId = data.courseId;
+    this.setContentView(require('../../../res/tpl/LessonScene.tpl'), {}, 'LessonScene', {}, () => {
+      document.getElementById('title').appendChild(document.createTextNode(data.title));
+      this.loadWareList();
+    });
+  }
+
+<<<<<<< HEAD
     onResume(data) {
     onResume(data) {
         if (!data) { return; }
         if (!data) { return; }
         //更新下当前的课件信息
         //更新下当前的课件信息
@@ -477,8 +664,29 @@ class LessonScene extends scene {
         //更新右侧视图
         //更新右侧视图
         this.updateRightView(this.wareList[curWareIndex]);
         this.updateRightView(this.wareList[curWareIndex]);
         this.isBack = true;
         this.isBack = true;
+=======
+  onResume(data) {
+    if (!data) { return; }
+    //更新下当前的课件信息
+    const { curWareIndex, curImageList, curImageIndex } = data;
+    this.curWareIndex = curWareIndex;
+    this.curWareId = this.wareList[curWareIndex].id;
+    this.curWareType = this.wareList[curWareIndex].type;
+    if (curImageList) {
+        this.curImageList = curImageList;
     }
     }
+    if (curImageIndex) {
+        this.curImageIndex = curImageIndex;
+>>>>>>> remotes/origin/dev_winpc_touch
+    }
+    //更新左侧焦点位置
+    this.moye.root.getWidgetById(`item-${this.curWareType}-${this.curWareId}-${this.curWareIndex}`).focus();
+    //更新右侧视图
+    this.updateRightView(this.wareList[curWareIndex]);
+    this.isBack = true;
+  }
 
 
+<<<<<<< HEAD
     onOK() {
     onOK() {
     	const leaf = FocusEngine.getFocusedLeaf();
     	const leaf = FocusEngine.getFocusedLeaf();
         // 拦截音频控制相关事件单独处理
         // 拦截音频控制相关事件单独处理
@@ -562,41 +770,93 @@ class LessonScene extends scene {
             default:
             default:
                 break;
                 break;
     	}
     	}
+=======
+  onOK(e) {
+    // 后退
+    if (e.target.con.classList.contains('goback')) {
+      this.hideScene({id: this.courseId}, 'CourseScene');
+      return;
+>>>>>>> remotes/origin/dev_winpc_touch
     }
     }
+  	const leaf = FocusEngine.getFocusedLeaf();
+  	switch (leaf.id) {
+  		case 'view-video-start':
+  			if (this.curWareType == Consts.TYPE_VIDEO) {
+  				if (this.videoPlayer.playStatus()) {
+  					this.videoPlayer.pause();
+  					document.getElementById('view-video-start').innerHTML = '播放';
+  				} else {
+  					this.videoPlayer.start();
+  					document.getElementById('view-video-start').innerHTML = '暂停';
+  				}
+  			}
+  			//添加播放记录
+  			this.postPlayRecord(this.curWareId, this.courseId);
+  			break;
+  		case 'view-full-screen':
+        if (this.curWareType === Consts.TYPE_IMAGE) {
+      		this.showScene(require('./ImageWareFullScreenScene.js'), {
+      			wareList: this.wareList,
+      			curWareIndex: this.curWareIndex,
+      			curImageList: this.curImageList,
+      			curImageIndex: this.curImageIndex,
+            isDownload: this.isDownload,
+      		});
+        }
+  			this.postPlayRecord(this.cur_item_id, this.courseId);
+  			break;
+  		case 'view-previous':
+  			if (this.curWareType === Consts.TYPE_IMAGE && this.curImageIndex - 1 >= 0) {
+  				this.curImageIndex -= 1;
+  				this.renderImageView();
+  			}
+  			this.postPlayRecord(this.curWareId, this.courseId);
+  			break;
+  		case 'view-next':
+  			if (this.curWareType === Consts.TYPE_IMAGE && this.curImageIndex + 1 < this.curImageList.length) {
+  				this.curImageIndex += 1;
+  				this.renderImageView();
+  			}
+  			this.postPlayRecord(this.curWareId, this.courseId);
+  		  break;
+      default:
+        break;
+  	}
+  }
 
 
-    onPause() {
+  onPause() {
 
 
-    }
+  }
 
 
-    onDestroy() {
+  onDestroy() {
 
 
-    }
+  }
 
 
-    onActive() {
+  onActive() {
 
 
-    }
+  }
 
 
-    onInactive() {
+  onInactive() {
 
 
-    }
+  }
 
 
-    onBack() {
-    	if (this.isBack) {
-    		return true;
-    	} else if (window.efunbox) {
-    		window.efunbox.closePlayer();
-    	}
-    }
+  onBack() {
+  	if (this.isBack) {
+  		return true;
+  	} else if (window.efunbox) {
+  		window.efunbox.closePlayer();
+  	}
+  }
 
 
-    onKeydown(e) {
-    	switch (e.keyCode) {
-    		case Consts.KEYCODE_EXIT:
-    			this.isBack = false;
-    			break;
-            default:
-                break;
-    	}
-    }
+  onKeydown(e) {
+  	switch (e.keyCode) {
+  		case Consts.KEYCODE_EXIT:
+  			this.isBack = false;
+  			break;
+      default:
+        break;
+  	}
+  }
 }
 }
 
 
 module.exports = LessonScene;
 module.exports = LessonScene;

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

@@ -163,6 +163,12 @@ class ShopCartScene extends scene {
 	// 在使用Atv时Id对应:e.target.id
 	// 在使用Atv时Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	onOK(e) {
 	onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
+		
 		if (e.target.con.id == 'send-msg' && this.goodsArr.length) {
 		if (e.target.con.id == 'send-msg' && this.goodsArr.length) {
 			this.showScene(require('./ShopCartCheckScene.js'), { id: 0 });
 			this.showScene(require('./ShopCartCheckScene.js'), { id: 0 });
 		} else if (e.target.con.classList.contains('del')) {
 		} else if (e.target.con.classList.contains('del')) {

+ 11 - 5
src/stage/index/scene/TerminalScene.js

@@ -8,11 +8,11 @@ class TerminalScene extends scene {
 	}
 	}
 
 
 	renderTerminalList(dataset) {
 	renderTerminalList(dataset) {
-		let stu_no = `<li class="info-item"><div>学号</div>:${dataset.eid.replace(/(\d{4})/g, '$1 ')}</li>`;
-		let cp_name = `<li class="info-item"><div>集团名称</div>:${dataset.merchantName}</li>`;
-		let schoole_name = `<li class="info-item"><div>校区名称</div>:${dataset.name}</li>`;
-		let contact_person = `<li class="info-item"><div>联系人</div>:${dataset.merchantContactName}</li>`;
-		let phone_num = `<li class="info-item"><div>电话</div>:${dataset.merchantContactMobile}</li>`;
+		let stu_no = `<li class="info-item"><span>学号</span>:${dataset.eid.replace(/(\d{4})/g, '$1 ')}</li>`;
+		let cp_name = `<li class="info-item"><span>集团名称</span>:${dataset.merchantName}</li>`;
+		let schoole_name = `<li class="info-item"><span>校区名称</span>:${dataset.name}</li>`;
+		let contact_person = `<li class="info-item"><span>联系人</span>:${dataset.merchantContactName}</li>`;
+		let phone_num = `<li class="info-item"><span>电话</span>:${dataset.merchantContactMobile}</li>`;
 		let list = document.getElementById('terminal-wrapper');
 		let list = document.getElementById('terminal-wrapper');
 		list.innerHTML = '';
 		list.innerHTML = '';
 		let listHtml = stu_no + cp_name + schoole_name + contact_person + phone_num;
 		let listHtml = stu_no + cp_name + schoole_name + contact_person + phone_num;
@@ -60,6 +60,12 @@ class TerminalScene extends scene {
 	// 在使用Atv时Id对应:e.target.id
 	// 在使用Atv时Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	// 非使用Atv是Id对应:e.target.id
 	onOK(e) {
 	onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+            this.hideScene({});
+            return;
+        }
+		
 		if (e.target.con.classList.contains('terminal-quit')) {
 		if (e.target.con.classList.contains('terminal-quit')) {
 			APIClient.userLogoutAndUnbindDevice((isTrue, res) => {
 			APIClient.userLogoutAndUnbindDevice((isTrue, res) => {
 				if (!isTrue) { return; }
 				if (!isTrue) { return; }

+ 17 - 2
src/stage/index/scene/VideoWareFullScreenScene.js

@@ -123,8 +123,14 @@ class VideoWareFullScreenScene extends scene {
             window.efunbox.fullScreen();
             window.efunbox.fullScreen();
             this.videoPlayer = window.efunbox;
             this.videoPlayer = window.efunbox;
         } else {
         } else {
-    		const videoDom = `<video id="hls-full-video" controls>你的浏览器不支持视频播放</video>`;
+    		const videoDom = `
+                <video id="hls-full-video" controls>你的浏览器不支持视频播放</video>
+            	<div class="goback" fe-role="Widget">
+            		<img src="assets/img/goback.png" />
+            	</div>
+            `;
     		document.getElementById('VideoWareFullScreen').innerHTML = videoDom;
     		document.getElementById('VideoWareFullScreen').innerHTML = videoDom;
+            this.moye.root.reRender();
     		this.videoPlayer = new HlsVideoPlugin();
     		this.videoPlayer = new HlsVideoPlugin();
     		this.videoPlayer.initH5Player(playUrl, 'hls-full-video');
     		this.videoPlayer.initH5Player(playUrl, 'hls-full-video');
         }
         }
@@ -164,7 +170,16 @@ class VideoWareFullScreenScene extends scene {
 
 
     }
     }
 
 
-    onOK() {
+    onOK(e) {
+        // 后退
+        if (e.target.con.classList.contains('goback')) {
+			this.hideScene({
+				curWareIndex: this.curWareIndex,
+				curImageList: this.curImageList,
+				curImageIndex: this.curImageIndex,
+			}, 'LessonScene');
+            return;
+        }
         if (this.videoPlayer.playStatus()) {
         if (this.videoPlayer.playStatus()) {
             this.videoPlayer.pause();
             this.videoPlayer.pause();
         } else {
         } else {

+ 1 - 1
src/stage/index/style/BuyConfirmScene.less

@@ -48,7 +48,7 @@
 			font-size: 0.48rem;
 			font-size: 0.48rem;
 
 
 			&.fe-focus {
 			&.fe-focus {
-				.after-focus(@borderSize; #ff5050);
+				//.after-focus(@borderSize; #ff5050);
 			}
 			}
 		}
 		}
 
 

+ 15 - 21
src/stage/index/style/CLScene.less

@@ -6,28 +6,19 @@
 #CLScene {
 #CLScene {
     position: absolute;
     position: absolute;
     width: 100%;
     width: 100%;
-    height: 100%;
-
-  	.cl-bg {
-  		position: absolute;
-  		top: 0;
-  		left: 0;
-  		z-index: -1;
-  		width: 100%;
-  		height: 100%;
-  		img {
-  			position: absolute;
-  			top: 0;
-  			left: 0;
-  			width: 100%;
-  			height: 100%;
-  		}
-  	}
+    height: 10.9rem;
+    background-image: url('assets/img/IndexScene/index_bg.png');
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
 
 
     #cl-left-panel {
     #cl-left-panel {
         float: left;
         float: left;
         width: 3.7rem;
         width: 3.7rem;
-        height: 100%;
+        height: 10.9rem;
+        background-image: url('assets/img/CLScene/cl_left.png');
+        background-size: 100% 100%;
+        background-repeat: no-repeat;
+
         #name-text {
         #name-text {
             color: #fff;
             color: #fff;
             font-size: 0.6rem;
             font-size: 0.6rem;
@@ -35,6 +26,9 @@
             padding-top: 0.58rem;
             padding-top: 0.58rem;
             padding-bottom: 0.33rem;
             padding-bottom: 0.33rem;
             text-align: center;
             text-align: center;
+            background-image: url('assets/img/CLScene/name_text.png');
+            background-size: 100% 100%;
+            background-repeat: no-repeat;
         }
         }
         #cl-left-tab-scroll{
         #cl-left-tab-scroll{
             position: relative;
             position: relative;
@@ -65,7 +59,7 @@
 
 
     #cl-right-panel {
     #cl-right-panel {
         float: right;
         float: right;
-        width: 15.5rem;
+        width: 15.1rem;
         height: 100%;
         height: 100%;
     }
     }
     .control-panel {
     .control-panel {
@@ -79,7 +73,7 @@
             border: solid unit(@borderSize, rem) transparent;
             border: solid unit(@borderSize, rem) transparent;
             border-radius: 0.5rem;
             border-radius: 0.5rem;
             &.fe-focus {
             &.fe-focus {
-                .after-focus(@borderSize; #ffe100);
+              //  .after-focus(@borderSize; #ffe100);
             }
             }
             img {
             img {
                 width: 0.78rem;
                 width: 0.78rem;
@@ -150,7 +144,7 @@
             //自定义周边商品item在当前scene的focus样式
             //自定义周边商品item在当前scene的focus样式
             &.fe-focus .course-item-frame,
             &.fe-focus .course-item-frame,
             &.fe-focus .goods-item-frame {
             &.fe-focus .goods-item-frame {
-                .after-focus(@borderSize; #ffe100);
+               // .after-focus(@borderSize; #ffe100);
             }
             }
         }
         }
 
 

+ 29 - 18
src/stage/index/style/CourseScene.less

@@ -1,4 +1,6 @@
 @import './component/GoodsItem.less';
 @import './component/GoodsItem.less';
+@import './IndexScene.less';
+
 
 
 .lesson-selected {
 .lesson-selected {
 	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
@@ -9,7 +11,7 @@
 	top: 0;
 	top: 0;
 	left: 0;
 	left: 0;
 	width: 100%;
 	width: 100%;
-	height: 100%;
+	height: 10.9rem;
 	overflow: hidden;
 	overflow: hidden;
 
 
 	.course-bg {
 	.course-bg {
@@ -51,7 +53,7 @@
 			display: inline-block;
 			display: inline-block;
 			width: 8rem;
 			width: 8rem;
 			height: 100%;
 			height: 100%;
-			margin-left: 2.3rem;
+			margin-left: 2.1rem;
 
 
 			.nav-item {
 			.nav-item {
 				position: relative;
 				position: relative;
@@ -91,7 +93,7 @@
 					}
 					}
 
 
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 
 
@@ -107,7 +109,7 @@
 					}
 					}
 
 
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 
 
@@ -123,7 +125,7 @@
 					}
 					}
 
 
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 
 
@@ -143,7 +145,7 @@
 					}
 					}
 
 
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 
 
@@ -170,9 +172,8 @@
 					&::after {
 					&::after {
 						content: '购物车';
 						content: '购物车';
 					}
 					}
-
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 			}
 			}
@@ -189,7 +190,7 @@
 			width: 100%;
 			width: 100%;
 			padding: 0.28rem 1.43rem 0;
 			padding: 0.28rem 1.43rem 0;
 			margin-top: .5rem;
 			margin-top: .5rem;
-			overflow: hidden;
+			overflow: scroll;
 			height: 8.8rem;
 			height: 8.8rem;
 
 
 			.scroll-list {
 			.scroll-list {
@@ -211,9 +212,6 @@
 					font-size: .48rem;
 					font-size: .48rem;
 					color: #404040;
 					color: #404040;
 					padding: 0 0.4rem;
 					padding: 0 0.4rem;
-					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
-					}
 					.free-flag {
 					.free-flag {
 						width: .86rem;
 						width: .86rem;
 						height: .86rem;
 						height: .86rem;
@@ -223,6 +221,19 @@
 						background: url('assets/img/CourseScene/icon_free.png') no-repeat center;
 						background: url('assets/img/CourseScene/icon_free.png') no-repeat center;
 						background-size: cover;
 						background-size: cover;
 					}
 					}
+					&::after {
+						content: " ";
+						display: block;
+						position: absolute;
+						left: 0;
+						top: -100%;
+						width: 100%;
+						height: 300%;
+						background-color: transparent;
+					}
+					&:active::after {
+						animation: circle-opacity .3s;
+					}
 				}
 				}
 
 
 				.download-btn-lesson {}
 				.download-btn-lesson {}
@@ -240,7 +251,7 @@
 					background-repeat: no-repeat;
 					background-repeat: no-repeat;
 					background-size: cover;
 					background-size: cover;
 					&.fe-focus {
 					&.fe-focus {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+					//	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 
 
@@ -286,7 +297,7 @@
 						}
 						}
 
 
 						&.fe-focus {
 						&.fe-focus {
-							.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 						}
 						}
 					}
 					}
 
 
@@ -304,7 +315,7 @@
 						background-repeat: no-repeat;
 						background-repeat: no-repeat;
 						background-size: cover;
 						background-size: cover;
 						&.fe-focus {
 						&.fe-focus {
-							.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+						//	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 						}
 						}
 					}
 					}
 
 
@@ -405,7 +416,7 @@
 
 
 				&.fe-focus {
 				&.fe-focus {
 					padding-top: .1rem;
 					padding-top: .1rem;
-					.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+					//.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 				}
 				}
 
 
 				p {
 				p {
@@ -426,7 +437,7 @@
 				background-size: cover;
 				background-size: cover;
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+				//	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 				}
 				}
 
 
 				&.renewal-fee {
 				&.renewal-fee {
@@ -469,7 +480,7 @@
 					}
 					}
 
 
 					&.fe-focus .goods-item-frame {
 					&.fe-focus .goods-item-frame {
-						.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
+					//	.after-focus(@borderSize; #ff5050; .1rem; rgba(0,0,0,0.5));
 					}
 					}
 				}
 				}
 			}
 			}

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

@@ -49,7 +49,7 @@
 			font-size: 0.48rem;
 			font-size: 0.48rem;
 
 
 			&.fe-focus {
 			&.fe-focus {
-				.after-focus(@borderSize; #ff5050);
+				//.after-focus(@borderSize; #ff5050);
 			}
 			}
 		}
 		}
 
 
@@ -67,7 +67,7 @@
 			font-size: 0.48rem;
 			font-size: 0.48rem;
 
 
 			&.fe-focus {
 			&.fe-focus {
-				.after-focus(@borderSize; #ff5050);
+				//.after-focus(@borderSize; #ff5050);
 			}
 			}
 		}
 		}
 	}
 	}

+ 10 - 21
src/stage/index/style/DownloadScene.less

@@ -5,35 +5,24 @@
 	top: 0;
 	top: 0;
 	left: 0;
 	left: 0;
 	width: 100%;
 	width: 100%;
-	height: 100%;
+	height: 10.9rem;
 	overflow: hidden;
 	overflow: hidden;
 	text-align: center;
 	text-align: center;
-
-	.download-manager-bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: -1;
-		width: 100%;
-		height: 100%;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
+	background-image: url('assets/img/IndexScene/index_bg.png');
+	background-size: 100% 100%;
+	background-repeat: no-repeat;
 
 
 	.local-download-icon{
 	.local-download-icon{
 		float: left;
 		float: left;
 		position: relative;
 		position: relative;
 		left:0.5rem;
 		left:0.5rem;
 		top:0.3rem;
 		top:0.3rem;
-		width:3rem;
 		img {
 		img {
-			float: left;
+			display: inline-block;
 			width: 1rem;
 			width: 1rem;
 		}
 		}
 		div{
 		div{
-			float: left;
+			display: inline-block;
 			font-size: 0.3rem;
 			font-size: 0.3rem;
 			color: white;
 			color: white;
 			margin-top: 0.3rem;
 			margin-top: 0.3rem;
@@ -179,8 +168,8 @@
 				}
 				}
 
 
 				&.fe-focus {
 				&.fe-focus {
-					border: .05rem solid #ffe100;
-					border-radius: .25rem;
+			//		border: .05rem solid #ffe100;
+			//		border-radius: .25rem;
 				}
 				}
 			}
 			}
 
 
@@ -193,8 +182,8 @@
 					width: 100%;
 					width: 100%;
 				}
 				}
 				&.fe-focus {
 				&.fe-focus {
-					border: .05rem solid #ffe100;
-					border-radius: .25rem;
+					//border: .05rem solid #ffe100;
+					//border-radius: .25rem;
 				}
 				}
 			}
 			}
 		}
 		}

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

@@ -18,7 +18,7 @@
             border: solid unit(@borderSize, rem) transparent;
             border: solid unit(@borderSize, rem) transparent;
             border-radius: 0.5rem;
             border-radius: 0.5rem;
             &.fe-focus {
             &.fe-focus {
-                .after-focus(@borderSize; #ffe100);
+               // .after-focus(@borderSize; #ffe100);
             }
             }
             img {
             img {
                 width: 0.78rem;
                 width: 0.78rem;
@@ -101,7 +101,7 @@
                     border: solid unit(@borderSize, rem) transparent;
                     border: solid unit(@borderSize, rem) transparent;
                     border-radius: 0.24rem;
                     border-radius: 0.24rem;
                     &.fe-focus {
                     &.fe-focus {
-                        .after-focus(@borderSize; #ffe100);
+                       // .after-focus(@borderSize; #ffe100);
                     }
                     }
                     img {
                     img {
                         width: 2.77rem;
                         width: 2.77rem;
@@ -143,7 +143,7 @@
                 margin: 0.16rem 0.5rem 0 0;
                 margin: 0.16rem 0.5rem 0 0;
                 padding: 0.03rem;
                 padding: 0.03rem;
                 &.fe-focus {
                 &.fe-focus {
-                    .after-focus(@borderSize; #ffe100);
+                   // .after-focus(@borderSize; #ffe100);
                 }
                 }
                 img {
                 img {
                     position: inherit;
                     position: inherit;

+ 30 - 10
src/stage/index/style/ImageWareFullScreen.less

@@ -10,16 +10,36 @@
 	background-repeat: no-repeat;
 	background-repeat: no-repeat;
 }
 }
 #imgLeft {
 #imgLeft {
-  position: absolute;
-  top: 5rem;
-  left: 0.5rem;
-  display: none;
-  z-index: 2;
+	position: absolute;
+	top: 5rem;
+	left: 0.15rem;
+	width: .77rem;
+	height: .78rem;
+	z-index: 2;
+	border: solid unit(@borderSize, rem) transparent;
+	border-radius: 50%;
+	img {
+		width: 100%;
+		height: 100%;
+	}
+	&.fe-focus {
+		// border: solid unit(@borderSize, rem) #ffe100;
+	}
 }
 }
 #imgRight {
 #imgRight {
-  position: absolute;
-  top: 5rem;
-  right: 0.5rem;
-  display: none;
-  z-index: 2;
+	position: absolute;
+	top: 5rem;
+	right: 0.15rem;
+	z-index: 2;
+	width: .87rem;
+	height: .88rem;
+	border: solid unit(@borderSize, rem) transparent;
+	border-radius: 50%;
+	img {
+		width: 100%;
+		height: 100%;
+	}
+	&.fe-focus {
+		// border: solid unit(@borderSize, rem) #ffe100;
+	}
 }
 }

+ 89 - 47
src/stage/index/style/IndexScene.less

@@ -1,31 +1,72 @@
 @import './component/CourseItem.less';
 @import './component/CourseItem.less';
 
 
+@keyframes circle-opacity{
+	0% {
+		background: -webkit-radial-gradient(rgba(207,209,209,.3) 10%, rgba(207,209,209,.35) 20%,rgba(0,0,0,0) 20%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	25% {
+		background: -webkit-radial-gradient(rgba(207,209,209,.4) 20%, rgba(207,209,209,.45) 40%,rgba(0,0,0,0) 40%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	50% {
+		background: -webkit-radial-gradient(rgba(207,209,209,.4) 30%, rgba(207,209,209,.4) 60%,rgba(0,0,0,0) 60%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	70% {
+		background: -webkit-radial-gradient(rgba(186,188,188,.3) 60%, rgba(186,188,188,.35) 70%,rgba(0,0,0,0) 70%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	100% {
+		background: -webkit-radial-gradient(rgba(186,188,188,.3) 70%, rgba(186,188,188,.35) 100%,rgba(0,0,0,0) 100%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+}
+
+@keyframes circle-opacity-fun{
+	0% {
+		background: -webkit-radial-gradient(rgba(0,0,0,.3) 10%, rgba(0,0,0,.35) 20%,rgba(0,0,0,0) 20%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	25% {
+		background: -webkit-radial-gradient(rgba(0,0,0,.4) 20%, rgba(0,0,0,.45) 40%,rgba(0,0,0,0) 40%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	50% {
+		background: -webkit-radial-gradient(rgba(0,0,0,.4) 30%, rgba(0,0,0,.4) 60%,rgba(0,0,0,0) 60%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	70% {
+		background: -webkit-radial-gradient(rgba(0,0,0,.3) 60%, rgba(0,0,0,.35) 70%,rgba(0,0,0,0) 70%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+	100% {
+		background: -webkit-radial-gradient(rgba(0,0,0,.3) 70%, rgba(0,0,0,.35) 100%,rgba(0,0,0,0) 100%); /* Safari 5.1 - 6.0 */
+		//background: radial-gradient(rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,.2),rgba(0,0,0,.3),rgba(0,0,0,.4),rgba(0,0,0,.5)); /* 标准的语法(必须放在最后) */
+	}
+}
+
 #IndexScene {
 #IndexScene {
 	position: absolute;
 	position: absolute;
-	width: 100%;
-	height: 100%;
-	padding: 0.05rem 1.2rem 0;
-
-	.index-bg {
+	width: unit(@designWidth, rem);
+	height: unit(@designHeight, rem);
+	padding: 0.05rem 1.2rem .5rem;
+	background-image: url('assets/img/IndexScene/index_bg.png');
+	background-size: cover;
+	background-repeat: no-repeat;
+
+	.m-logo{
 		position: absolute;
 		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: -1;
-		width: 100%;
-		height: 100%;
-		img {
-			position: absolute;
-			top: 0;
-			left: 0;
-			width: 100%;
-			height: 100%;
-		}
+		top: 1rem;
+		width: 3.62rem;
+		height: 1.30rem;
+		background-image: url('assets/img/IndexScene/logo.png');
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
 	}
 	}
-
 	.m-header-user{
 	.m-header-user{
 		height: 0.96rem;
 		height: 0.96rem;
 		margin-top: 1rem;
 		margin-top: 1rem;
-
 		.user-info {
 		.user-info {
 			float: right;
 			float: right;
 			width: auto;
 			width: auto;
@@ -34,6 +75,8 @@
 			border-radius: 0.55rem;
 			border-radius: 0.55rem;
 			padding-left: 0.2rem;
 			padding-left: 0.2rem;
 			padding-right: 0.3rem;
 			padding-right: 0.3rem;
+			padding-top: 0.1rem;
+			padding-bottom: 0.1rem;
 			margin-right: -0.3rem;
 			margin-right: -0.3rem;
 			text-align: right;
 			text-align: right;
 
 
@@ -60,28 +103,17 @@
 					font-size: 0.36rem;
 					font-size: 0.36rem;
 				}
 				}
 			}
 			}
-
-			&.fe-focus {
-				border: solid unit(@borderSize, rem) #ffe100;
-				box-shadow: .03rem .03rem unit(0, rem) transparent;
-				z-index: 9999;
-				.user-info-icon {
-					width: .9rem;
-				}
-			}
 		}
 		}
 	}
 	}
-
 	.m-main {
 	.m-main {
 		width: 100%;
 		width: 100%;
-		height: 8.6rem;
+		height: 7.8rem;
 		margin-top: 0.3rem;
 		margin-top: 0.3rem;
-		padding: .2rem 0rem .3rem 0rem;
+		padding: .2rem 0rem 0rem 0rem;
 		overflow-y: hidden;
 		overflow-y: hidden;
-
 		.scroll-list {
 		.scroll-list {
 			width: 100%;
 			width: 100%;
-			padding-bottom: 0.5rem;
+			padding-bottom: 0.3rem;
 
 
 			.history-wrapper {
 			.history-wrapper {
 				font-size: 0;
 				font-size: 0;
@@ -91,22 +123,17 @@
 				overflow: hidden;
 				overflow: hidden;
 
 
 				.history-item {
 				.history-item {
+					position: relative;
 					display: inline-block;
 					display: inline-block;
 					width: 20%;
 					width: 20%;
 					height: 100%;
 					height: 100%;
 					padding: 0 .06rem;
 					padding: 0 .06rem;
-
 					.course-item-frame {
 					.course-item-frame {
 						color: #303030;
 						color: #303030;
 						.course-item-frame;
 						.course-item-frame;
 					}
 					}
-
-					&.fe-focus .course-item-frame {
-						.after-focus(@borderSize; #ffe100);
-					}
 				}
 				}
 			}
 			}
-
 			.fun-wrapper {
 			.fun-wrapper {
 				width: 100%;
 				width: 100%;
 				height: 1.8rem;
 				height: 1.8rem;
@@ -114,13 +141,13 @@
 				margin-top: .02rem;
 				margin-top: .02rem;
 				margin-bottom: .65rem;
 				margin-bottom: .65rem;
 				font-size: 0;
 				font-size: 0;
-
 				.fun-item {
 				.fun-item {
+					position: relative;
 					display: inline-block;
 					display: inline-block;
 					width: 20%;
 					width: 20%;
 					height: 1.8rem + 2 * unit(@borderSize, rem);
 					height: 1.8rem + 2 * unit(@borderSize, rem);
 					padding: 0 0.11rem - unit(@borderSize, rem);
 					padding: 0 0.11rem - unit(@borderSize, rem);
-
+					overflow: hidden;
 					img {
 					img {
 						margin-left: .22rem;
 						margin-left: .22rem;
 						height: 1.8rem;
 						height: 1.8rem;
@@ -130,16 +157,31 @@
 						&:first-child {
 						&:first-child {
 							margin-left: 0;
 							margin-left: 0;
 						}
 						}
-						&.fe-focus {
-							.after-focus(@borderSize; #ffe100);
-						}
 					}
 					}
-
-					&.fe-focus img {
-						.after-focus(@borderSize; #ffe100);
+					//点击触摸反馈样式 响应
+					&::after {
+						content: " ";
+						display: block;
+						position: absolute;
+						left: 0;
+						top: -100%;
+						margin-left: .11rem;
+						width: 3.1rem;
+						height: 300%;
+						background-color: transparent;
+					}
+					&:active::after {
+						animation: circle-opacity .3s;
 					}
 					}
+
 				}
 				}
 			}
 			}
 		}
 		}
 	}
 	}
+	.index_msg {
+		font-family: -webkit-pictograph;
+		text-align: center;
+		color: rgba(255,255,255,.4);
+		font-size: .32rem;
+	}
 }
 }

+ 12 - 12
src/stage/index/style/LessonScene.less

@@ -5,7 +5,7 @@
 	left: 0;
 	left: 0;
 	top: 0;
 	top: 0;
 	width: 100%;
 	width: 100%;
-	height: 100%;
+	height: 10.9rem;
 	overflow: hidden;
 	overflow: hidden;
 	background-image: url("assets/img/LessonScene/background.jpg");
 	background-image: url("assets/img/LessonScene/background.jpg");
 	background-size: 100% 100%;
 	background-size: 100% 100%;
@@ -24,7 +24,7 @@
 
 
 	#list {
 	#list {
 		position: absolute;
 		position: absolute;
-		top: 1.7rem;
+		top: 1.6rem;
 		left: 0.7rem;
 		left: 0.7rem;
 		width: 7.2rem;
 		width: 7.2rem;
 		height: 8.15rem;
 		height: 8.15rem;
@@ -94,10 +94,10 @@
 
 
 	#view {
 	#view {
 		position: absolute;
 		position: absolute;
-		top: 1.7rem;
+		top: 1.6rem;
 		left: 7.9rem;
 		left: 7.9rem;
 		width: 10.72rem;
 		width: 10.72rem;
-		height: 8.15rem;
+		height: 8.03rem;
 		background-color: #2b63e2;
 		background-color: #2b63e2;
 
 
 		#view-top {
 		#view-top {
@@ -120,7 +120,7 @@
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
 			}
 			}
-			video {
+			#hls-video {
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
 			}
 			}
@@ -178,7 +178,7 @@
 			left: 0rem;
 			left: 0rem;
 			top: 7.03rem;
 			top: 7.03rem;
 			width: 10.72rem;
 			width: 10.72rem;
-			height: 1.12rem;
+			height: 1rem;
 
 
 			.view-text-ctl-btn{
 			.view-text-ctl-btn{
 				position: absolute;
 				position: absolute;
@@ -211,7 +211,7 @@
 				*/
 				*/
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 
 
@@ -219,7 +219,7 @@
 				position: absolute;
 				position: absolute;
 				left: 5.88rem;
 				left: 5.88rem;
 				//left: 4.82rem;
 				//left: 4.82rem;
-				top: 0.2rem;
+				top: 0.15rem;
 				width: 1.4rem;
 				width: 1.4rem;
 				//height: 0.65rem;
 				//height: 0.65rem;
 				//line-height: 0.65rem;
 				//line-height: 0.65rem;
@@ -246,7 +246,7 @@
 				*/
 				*/
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 
 
@@ -262,12 +262,12 @@
 				color: #ffffff;
 				color: #ffffff;
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 
 
 			.view-full-screen-video {
 			.view-full-screen-video {
-        		position: absolute;
+        position: absolute;
 				left:1.53rem;
 				left:1.53rem;
 				top: 0.2rem;
 				top: 0.2rem;
 				width: 2.2rem;
 				width: 2.2rem;
@@ -278,7 +278,7 @@
 				background-repeat: no-repeat;
 				background-repeat: no-repeat;
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 
 

+ 27 - 26
src/stage/index/style/LoginScene.less

@@ -16,26 +16,26 @@
 	left: 0;
 	left: 0;
 	top: 0;
 	top: 0;
 	width: 100%;
 	width: 100%;
-	height: 100%;
+	height: 10.9rem;
 	overflow: hidden;
 	overflow: hidden;
-	background-color: rgba(0, 0, 0, 0.1);
-	background-image: url('assets/img/LoginScene/background.png');
+	background-image: url('assets/img/LoginScene/page_bg.png');
 	background-size: 100% 100%;
 	background-size: 100% 100%;
 	background-repeat: no-repeat;
 	background-repeat: no-repeat;
+	padding: .8rem 1.2rem .4rem;
 
 
 	.formBox {
 	.formBox {
-		position: absolute;
-		top: 4.57rem;
-		left: 2.2rem;
-		width: 8.3rem;
-		height: 3.7rem;
-
+		width: 10.5rem;
+		height: 8.9rem;
+		padding: 3.7rem 1.1rem 0 1rem;
+		background-image: url('assets/img/LoginScene/left_bg.png');
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
 		.form-sid {
 		.form-sid {
-			position: relative;
-			width: 8.3rem;
+			width: 100%;
 			height: 0.8rem;
 			height: 0.8rem;
 			border-radius: 5rem;
 			border-radius: 5rem;
 			border: solid unit(@outLineSize, rem) #d3d3d3;
 			border: solid unit(@outLineSize, rem) #d3d3d3;
+			overflow: hidden;
 
 
 			.form-sid-label {
 			.form-sid-label {
 				float: left;
 				float: left;
@@ -63,13 +63,12 @@
 		}
 		}
 
 
 		.form-password {
 		.form-password {
-			position: relative;
-			top: 0.3rem;
-			width: 8.3rem;
+			margin-top: 0.3rem;
+			width: 100%;
 			height: 0.8rem;
 			height: 0.8rem;
 			border-radius: 5rem;
 			border-radius: 5rem;
 			border: solid unit(@outLineSize, rem) #d3d3d3;
 			border: solid unit(@outLineSize, rem) #d3d3d3;
-
+			overflow: hidden;
 			.form-password-label {
 			.form-password-label {
 				float: left;
 				float: left;
 				width: 1.5rem;
 				width: 1.5rem;
@@ -96,9 +95,8 @@
 		}
 		}
 
 
 		.form-submit {
 		.form-submit {
-			position: relative;
-			top: 1.18rem;
-			width: 8.5rem;
+			margin-top: 1.18rem;
+			width: 100%;
 			height: 0.8rem;
 			height: 0.8rem;
 			background: #fff;
 			background: #fff;
 			margin-left: -0.2rem;
 			margin-left: -0.2rem;
@@ -117,7 +115,7 @@
 
 
 				&.fe-focus {
 				&.fe-focus {
 					background: #2973d7;
 					background: #2973d7;
-					.after-focus(@outLineSize; #ff5a00; 0; #ff5a00);
+				//	.after-focus(@outLineSize; #ff5a00; 0; #ff5a00);
 				}
 				}
 			}
 			}
 		}
 		}
@@ -125,10 +123,15 @@
 
 
 	.keyborad {
 	.keyborad {
 		position: absolute;
 		position: absolute;
-		top: 3.7rem;
-		left: 12.5rem;
-		width: 4.4rem;
-		height: 5.2rem;
+		top: .8rem;
+		right: 1.2rem;
+		width: 6.9rem;
+		height: 8.9rem;
+		background-image: url('assets/img/LoginScene/right_bg.png');
+		//background-color: rgba(0, 0, 0, 0.1);
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
+		padding: 3rem 0rem 0rem 1.8rem;
 
 
 		.keyborad-item {
 		.keyborad-item {
 			width: 1rem;
 			width: 1rem;
@@ -136,7 +139,6 @@
 			float: left;
 			float: left;
 			margin: 0 0.45rem 0.3rem 0;
 			margin: 0 0.45rem 0.3rem 0;
 			.before-focus;
 			.before-focus;
-
 			.key-icon {
 			.key-icon {
 				.keyborad-box;
 				.keyborad-box;
 
 
@@ -188,9 +190,8 @@
 					background-image: url('assets/img/LoginScene/enter.png');
 					background-image: url('assets/img/LoginScene/enter.png');
 				}
 				}
 			}
 			}
-
 			&.fe-focus .key-icon {
 			&.fe-focus .key-icon {
-				.after-focus(@outLineSize; #ff5a00; 0; #ff5a00);
+			//	.after-focus(@outLineSize; #ff5a00; 0; #ff5a00);
 			}
 			}
 		}
 		}
 	}
 	}

+ 15 - 0
src/stage/index/style/Mixins.less

@@ -29,3 +29,18 @@
 	box-shadow: .03rem .03rem unit(@boxShadowSize, rem) @boxShadowColor;
 	box-shadow: .03rem .03rem unit(@boxShadowSize, rem) @boxShadowColor;
 	z-index: 9999;
 	z-index: 9999;
 }
 }
+
+.goback {
+	z-index: 99999;
+	position: absolute;
+	width: .93rem;
+	height: .94rem;
+	bottom: .15rem;
+	right: .15rem;
+	border: solid unit(@borderSize, rem) transparent;
+	border-radius: 50%;
+	img {
+		width: 100%;
+		height: 100%;
+	}
+}

+ 1 - 1
src/stage/index/style/RepeatLoginScene.less

@@ -50,7 +50,7 @@
 			}
 			}
 
 
 			&.fe-focus {
 			&.fe-focus {
-				.after-focus(@borderSize; #ffe100);
+				//.after-focus(@borderSize; #ffe100);
 				border-radius: .5rem;
 				border-radius: .5rem;
 			}
 			}
 		}
 		}

+ 19 - 16
src/stage/index/style/ShopCartScene.less

@@ -6,21 +6,12 @@
 	top: 0;
 	top: 0;
 	left: 0;
 	left: 0;
 	width: 100%;
 	width: 100%;
-	height: 100%;
+	height: 10.9rem;
 	overflow: hidden;
 	overflow: hidden;
+	background-image: url('assets/img/IndexScene/index_bg.png');
+	background-size: 100% 100%;
+	background-repeat: no-repeat;
 
 
-	.cart-bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: -1;
-		width: 100%;
-		height: 100%;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
 	.cart-name {
 	.cart-name {
 		position: absolute;
 		position: absolute;
 		top: .7rem;
 		top: .7rem;
@@ -29,6 +20,18 @@
 		line-height: .5rem;
 		line-height: .5rem;
 		font-size: .36rem;
 		font-size: .36rem;
 		color: #fff;
 		color: #fff;
+		&::before {
+			content: "";
+			display: inline-block;
+			position: absolute;
+			top: -.3rem;
+			left: -1.1rem;
+			width: .8rem;
+			height: .8rem;
+			background-image: url('assets/img/shopCart.png');
+			background-size: 100% 100%;
+			background-repeat: no-repeat;
+		}
 	}
 	}
 	.cart-empty {
 	.cart-empty {
 		position: absolute;
 		position: absolute;
@@ -80,7 +83,7 @@
 				}
 				}
 
 
 				&.fe-focus .goods-item-frame, &.fe-focus .course-item-frame{
 				&.fe-focus .goods-item-frame, &.fe-focus .course-item-frame{
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 
 
@@ -96,7 +99,7 @@
 				background-size: cover;
 				background-size: cover;
 
 
 				&.fe-focus {
 				&.fe-focus {
-					.after-focus(@borderSize; #ffe100);
+				//	.after-focus(@borderSize; #ffe100);
 				}
 				}
 			}
 			}
 		}
 		}
@@ -114,7 +117,7 @@
 		background-size: cover;
 		background-size: cover;
 
 
 		&.fe-focus {
 		&.fe-focus {
-			.after-focus(@borderSize; #ffe100);
+			//.after-focus(@borderSize; #ffe100);
 		}
 		}
 	}
 	}
 }
 }

+ 67 - 49
src/stage/index/style/TerminalScene.less

@@ -1,61 +1,79 @@
 #TerminalScene {
 #TerminalScene {
 	position: absolute;
 	position: absolute;
 	width: 100%;
 	width: 100%;
-	height: 100%;
-	padding: 0 3.76rem;
-    background-size: cover;
-
-	.terminal-bg {
+	height: 10.9rem ;
+	background-image: url('assets/img/IndexScene/index_bg.png');
+	background-size: cover;
+	background-repeat: no-repeat;
+	overflow: hidden;
+	//居中列表
+	.content {
 		position: absolute;
 		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: -1;
-		width: 100%;
-		height: 100%;
-		img {
-			position: absolute;
-			top: 0;
-			left: 0;
+		width: 13rem;
+		left: 50%;
+		margin-left: -6.5rem;
+		padding-top: 1.78rem;
+		padding-bottom: 1.78rem;
+		font-size: .46rem;
+		.terminal-wrapper {
 			width: 100%;
 			width: 100%;
-			height: 100%;
+			height: 7rem;
+			border-radius: 1rem;
+			padding: .2rem .7rem 0;
+			box-sizing: border-box;
+			background-color: #FFFAEA;
+			.info-item {
+				width: 100%;
+				height: 1.2rem;
+				padding-left: .2rem;
+				line-height: 1.7rem;
+				font-size: .46rem;
+				border-bottom: .05rem dashed #fcca98;
+				span {
+					display: inline-block;
+					width: 2rem;
+					height: 100%;
+					text-align:justify;
+					text-justify:distribute-all-lines;/*ie6-8*/
+					text-align-last:justify;/* ie9*/
+					-moz-text-align-last:justify;/*ff*/
+					-webkit-text-align-last:justify;/*chrome 20+*/
+				}
+				&:nth-last-child(1) {
+					border-bottom: none;
+					line-height: 1.6rem;
+				}
+			}
 		}
 		}
-	}
 
 
-	.terminal-wrapper {
-		margin-top: 2.78rem;
-
-		.info-item {
-			width: 100%;
-			height: .7rem;
-			margin-bottom: .5rem;
-			overflow: hidden;
-			font-size: .46rem;
-			color: #051841;
-			div {
-				display: inline-block;
-				width: 2rem;
-				height: 100%;
-				text-align:justify;
-                text-justify:distribute-all-lines;/*ie6-8*/
-                text-align-last:justify;/* ie9*/
-                -moz-text-align-last:justify;/*ff*/
-                -webkit-text-align-last:justify;/*chrome 20+*/
+		.terminal-quit {
+			position: absolute;
+			right: .8rem;
+			top: 2.4rem;
+			width: 2rem;
+			height: .65rem;
+			background-color: #1b79ca;
+			border-radius: .5rem;
+			text-align: center;
+			line-height: .65rem;
+			color: #FFF;
+			font-size: .38rem;
+			&.fe-focus {
+				//.after-focus(@borderSize; #ffe100);
 			}
 			}
 		}
 		}
-	}
-
-	.terminal-quit {
-		position: absolute;
-		top: 2.7rem;
-		right: 3.5rem;
-		width: 2rem;
-		height: .65rem;
-		background: url('assets/img/TerminalScene/quit.png') no-repeat center;
-		background-size: 100%;
-		border-radius: .3rem;
-
-		&.fe-focus {
-			.after-focus(@borderSize; #ffe100);
+		.terminal-remind {
+			margin-top: .5rem;
+			text-align: center;
+			font-size: .35rem;
+			color: #fff;
+			span {
+				display: inline-block;
+				width: 1.3rem;
+				background-color: #fff;
+				border-radius: 1rem;
+				color: #224371;
+			}
 		}
 		}
 	}
 	}
 }
 }

+ 5 - 0
src/util/API/APIClient.js

@@ -172,6 +172,11 @@ class APIClient {
 	  let params = { eventType, tarName, tarId, value };
 	  let params = { eventType, tarName, tarId, value };
 	  AJAXHelper.post('/callback/event', params, callback);
 	  AJAXHelper.post('/callback/event', params, callback);
 	}
 	}
+
+	// 获取用户的下载记录
+	static getUserDownloadList(callback) {
+		AJAXHelper.get('/callback/download/list', {}, callback);
+	}
 }
 }
 
 
 module.exports = APIClient;
 module.exports = APIClient;

+ 5 - 2
src/util/Consts.js

@@ -10,6 +10,9 @@ class Consts {
     }
     }
 }
 }
 
 
+//node服务接口地址
+Consts.NODE_SERVER = 'http://127.0.0.1:8089';
+
 //图片/视频资源域名
 //图片/视频资源域名
 Consts.IMG_PATH = 'https://efunimgs.ai160.com';
 Consts.IMG_PATH = 'https://efunimgs.ai160.com';
 Consts.VIDEO_PATH = 'https://efunvideo.ai160.com';
 Consts.VIDEO_PATH = 'https://efunvideo.ai160.com';
@@ -42,8 +45,8 @@ Consts.DOM_ID_LOCAL_DOWNLOAD_BUTTON = 'local-download-btn'
 Consts.EVENT_TYPE_OK = 'ok';
 Consts.EVENT_TYPE_OK = 'ok';
 
 
 Consts.DOWNLOAD_STATUS_UNDOWNLOAD = 0;
 Consts.DOWNLOAD_STATUS_UNDOWNLOAD = 0;
-Consts.DOWNLOAD_STATUS_ONGOING = 1;
-Consts.DOWNLOAD_STATUS_SUCCESS = 2;
+Consts.DOWNLOAD_STATUS_SUCCESS = 1;
+Consts.DOWNLOAD_STATUS_ONGOING = 2;
 Consts.DOWNLOAD_STATUS_FAILED = 3;
 Consts.DOWNLOAD_STATUS_FAILED = 3;
 
 
 Consts.ANDROID_FORCE_VERSION = '3.2.0';
 Consts.ANDROID_FORCE_VERSION = '3.2.0';

+ 58 - 0
src/util/EfunVideoPlayer.js

@@ -0,0 +1,58 @@
+class EfunVideoPlayer {
+  constructor() {
+    this.efunplayer = null;
+    this.metadata = null;
+  }
+
+  loadedHandler() {
+    this.efunplayer.addListener('loadedmetadata', () => {
+      this.metadata = this.efunplayer.getMetaDate();
+    });
+  }
+
+  initPlayer(url, domId) {
+    let videoObject = {
+      autoplay: true,
+      container: `#${domId}`,
+      variable: 'player',
+      video: url,
+    };
+    if (Hls.isSupported()) {
+      videoObject.html5m3u8 = true;
+    } else {
+      videoObject.flashplayer = true;
+    }
+    this.efunplayer = new ckplayer(videoObject);
+  }
+
+  playStatus() {
+    return (this.metadata || {})['paused'];
+  }
+
+  pause() {
+    console.log('click pause btn...');
+    this.efunplayer.videoPause();
+  }
+
+  start() {
+    this.efunplayer.videoPlay();
+  }
+
+  fullScreen() {
+    this.efunplayer.webkitRequestFullScreen();
+  }
+
+  getCurtime() {
+    return this.efunplayer.currentTime * 1000;
+  }
+
+  getDuration() {
+    return this.efunplayer.duration * 1000;
+  }
+
+  seekProgress(currentTime) {
+    this.efunplayer.videoSeek(currentTime);
+  }
+}
+
+module.exports = EfunVideoPlayer;

+ 1 - 1
src/util/Utils.js

@@ -201,7 +201,7 @@ class Utils {
         if (url.startsWith('http')) {
         if (url.startsWith('http')) {
             return url.replace('http://ljvideo.ai160.com', Consts.VIDEO_PATH);
             return url.replace('http://ljvideo.ai160.com', Consts.VIDEO_PATH);
         } else if (url.startsWith('https')) {
         } else if (url.startsWith('https')) {
-            return url;
+            return url.replace('https', 'http');
         } else {
         } else {
             return url;
             return url;
         }
         }

+ 64 - 0
src/util/WinBoxAPI.js

@@ -0,0 +1,64 @@
+import userDataStorage from './userDataStorage';
+import Consts from './Consts';
+
+class WinBoxAPI {
+  constructor() {}
+
+  static whenAjaxResponse(httpRequest, callback) {
+		if (httpRequest.readyState != 4) {
+			return;
+		}
+		let res = JSON.parse(httpRequest.responseText);
+		callback(httpRequest.status == 200, res);
+  }
+
+  static baseRequest(method, path, params, callback) {
+		let xmlHttpReq = new XMLHttpRequest();
+
+		let sendBody = null;
+    let url = `${Consts.NODE_SERVER}${path}?`;
+    if (method === 'GET') {
+      for (let key in params) {
+        url += `${key}=${params[key]}&`;
+      }
+    }
+		if (params && (method == 'POST' || method == 'PUT')) {
+			sendBody = JSON.stringify({...params});
+		}
+		xmlHttpReq.open(method, url, true);
+		xmlHttpReq.onreadystatechange = function () {
+			WinBoxAPI.whenAjaxResponse(xmlHttpReq, callback);
+		};
+		xmlHttpReq.send(sendBody);
+  }
+
+  static get(path, params, callback) {
+    WinBoxAPI.baseRequest('GET', path, params, callback);
+  }
+
+  static post(path, params) {
+    WinBoxAPI.baseRequest('POST', path, params, callback);
+  }
+
+  static postDownloadRequest(lessonId, courseId, callback) {
+		const { token = '', uid = '', eid = '' } = userDataStorage.getData() || {};
+    let path = '/lesson/downloadFile';
+    let params = { lessonId, courseId, uid, eid, token };
+    WinBoxAPI.get(path, params, callback);
+  }
+
+  static deleteDownloadFile(lessonId, courseId, callback) {
+		const { token = '', uid = '', eid = '' } = userDataStorage.getData() || {};
+    let path = '/lesson/delFile';
+    let params = { lessonId, courseId, uid, eid, token };
+    WinBoxAPI.get(path, params, callback);
+  }
+
+  static readDownloadedFile(lessonId, courseId, callback) {
+		const { token = '', uid = '', eid = '' } = userDataStorage.getData() || {};
+    let path = '/lesson/readFile';
+    let params = { lessonId, courseId, uid, eid, token };
+  }
+}
+
+module.exports = WinBoxAPI;

+ 8 - 60
src/util/course.js

@@ -16,70 +16,23 @@ class Course {
 			recs.push(item.id);
 			recs.push(item.id);
 		}
 		}
 
 
-    	let cmdResult = CommandBus.execute({type:CMD_TYPE.DOWNLOAD_LESSON_STATUS_GET, payload:{recs}});
-		let lessonDownloadStatus = {};
-		if (!cmdResult.status){
-			for(let idx in cmdResult.data.recs){
-        		let rec = cmdResult.data.recs[idx];
-				lessonDownloadStatus[rec.lessonID.toString()] = parseInt(rec.downloadStatus);
-			}
-		}
-
 		// 现在只按文字模板进行渲染
 		// 现在只按文字模板进行渲染
-		main.innerHTML = this.textList(data, lessonDownloadStatus, auth);
+		main.innerHTML = this.textList(data, auth);
 	}
 	}
 
 
-	//废弃
-	static imgList(data, lessonDownloadStatus) {
+	static textList(data, auth) {
 		let content = '';
 		let content = '';
-		function listItem(data, seq, downloadStatus) {
-
-      	//根据不同的下载状态,设置不同的Button状态
-		let btnClass = 'download-btn-lesson-icon-ready';
-		if (downloadStatus == Consts.DOWNLOAD_STATUS_ONGOING){
-			btnClass = 'download-btn-lesson-icon-ongoing';
-		}
-		else if (downloadStatus == Consts.DOWNLOAD_STATUS_SUCCESS) {
-			btnClass = 'download-btn-lesson-icon-success';
-		}
-
-		let url = data.picUrl ? `${Consts.IMG_PATH}/${data.picUrl}` : `http://via.placeholder.com/350x150?text=NO PIC ${data.id}`
-		return `<div data-seq="${seq}" class="lesson-icon-wrapper">
-		        <div id="lesson-btn-${seq}" data-id="${data.id}" data-template="${data.templateCode}" data-name="${data.itemTitle}" fe-role="Widget" class="img-wrapper" data-seq="${seq}">
-		  				<img src="${url}" alt="${data.itemTitle}">
-		  			</div>
-		        <div id="download-btn-${data.id}" fe-role="Widget" class="${btnClass}" data-id="${data.id}" data-name="${data.itemTitle}" data-seq="${seq}" ></div>
-			</div>`;
-		}
-
-		for (let i in data) {
-			let downloadStatus = Consts.DOWNLOAD_STATUS_UNDOWNLOAD;
-			let lessonId = data[i].id.toString();
-			if (lessonDownloadStatus[lessonId]){
-				downloadStatus = lessonDownloadStatus[lessonId];
-			}
-
-			content += listItem(data[i], i, downloadStatus);
-		}
-
-		return `<div class="list-pic-container" fe-role="Scroll" fe-cfg="scroll_dir:v,scroll_center:con,scroll_duration:0.2,scroll_easing:linear">
-		<div class="scroll-list clearfix" id="course-main-list">${content}</div>
-		</div>`;
-	}
-
-	static textList(data, lessonDownloadStatus, auth) {
-		let content = '';
-		function listItem(data, seq, downloadStatus, isFree) {
+		function listItem(data, seq, isFree) {
 			let btnClass = 'download-btn-lesson-list-ready';
 			let btnClass = 'download-btn-lesson-list-ready';
-			if (downloadStatus == Consts.DOWNLOAD_STATUS_ONGOING){
+			if (data.downloadStatus == Consts.DOWNLOAD_STATUS_ONGOING){
 				btnClass = 'download-btn-lesson-list-ongoing';
 				btnClass = 'download-btn-lesson-list-ongoing';
 			}
 			}
-			else if (downloadStatus == Consts.DOWNLOAD_STATUS_SUCCESS) {
+			else if (data.downloadStatus == Consts.DOWNLOAD_STATUS_SUCCESS) {
 				btnClass = 'download-btn-lesson-list-success';
 				btnClass = 'download-btn-lesson-list-success';
 			}
 			}
 			return `
 			return `
 				<div data-seq="${seq}">
 				<div data-seq="${seq}">
-		        	<div id="lesson-btn-${seq}" data-id="${data.id}" data-name="${data.title}" data-seq="${seq}" fe-role="Widget" class="text-wrapper">
+		        	<div id="lesson-btn-${seq}" data-id="${data.id}" data-name="${data.title}" data-dload="${data.downloadStatus}" data-seq="${seq}" fe-role="Widget" class="text-wrapper">
 						${Utils.fixOverflowStr(data.title, 32, '...')}
 						${Utils.fixOverflowStr(data.title, 32, '...')}
 						<div class="free-flag" style="display: ${isFree ? "block" : "none"}"></div>
 						<div class="free-flag" style="display: ${isFree ? "block" : "none"}"></div>
 					</div>
 					</div>
@@ -89,16 +42,11 @@ class Course {
 			`;
 			`;
 		}
 		}
 		for (let i in data) {
 		for (let i in data) {
-			let downloadStatus = Consts.DOWNLOAD_STATUS_UNDOWNLOAD;
-			let lessonId = data[i].id.toString();
-			if (lessonDownloadStatus[lessonId]){
-				downloadStatus = lessonDownloadStatus[lessonId];
-			}
 			// 课程未购买的第一课加入free标记
 			// 课程未购买的第一课加入free标记
 			if (i == 0 && !auth) {
 			if (i == 0 && !auth) {
-				content += listItem(data[i], i, downloadStatus, true);
+				content += listItem(data[i], i, true);
 			} else {
 			} else {
-				content += listItem(data[i], i, downloadStatus, false);
+				content += listItem(data[i], i, false);
 			}
 			}
 		}
 		}
 		return `<div id="list-text-container" class="list-text-container" fe-role="Scroll" fe-cfg="scroll_dir:v,scroll_center:con,scroll_duration:0.2,scroll_easing:linear"><div class="scroll-list clearfix" id="course-main-list">${content}</div></div> `;
 		return `<div id="list-text-container" class="list-text-container" fe-role="Scroll" fe-cfg="scroll_dir:v,scroll_center:con,scroll_duration:0.2,scroll_easing:linear"><div class="scroll-list clearfix" id="course-main-list">${content}</div></div> `;