Просмотр исходного кода

:twisted_rightwards_arrows: Merge branch 'dev_base' into online_talenkid

zhanghe 6 лет назад
Родитель
Сommit
9616dd0257

+ 5 - 1
src/res/tpl/RepeatLoginScene.tpl

@@ -1,14 +1,18 @@
 <div id="RepeatLoginScene" class="repeat-login-prompt-wrapper" fe-role="Switch">
   <div class="prompt-wrapper">
     <div class="prompt-bg">
-  	  <img src="./../../stage/index/assets/img/RepeatLoginScene/repeat_login_bg.png" alt="">
+  	  <img src="assets/img/RepeatLoginScene/repeat_login_bg.png" alt="">
     </div>
     <div class="prompt-msg">
   	  <p>有老师在使用这个账号,</p>
       <p>现在您不能使用。</p>
     </div>
     <div class="iknow" id="iknow-btn" fe-role="Widget">
+<<<<<<< HEAD
       <img src="./../../stage/index/assets/img/RepeatLoginScene/repeat_login_ikonw_btn.png" alt="">
+=======
+      <img src="assets/img/RepeatLoginScene/repeat_login_ikonw_btn.png" alt="">
+>>>>>>> dev_base
     </div>
   </div>
 </div>

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

@@ -1,13 +1,4 @@
 {
-    "api_url_kid": "http://kid-app.lingjiao.cn",
-    "api_url_test": "http://tt-web.api.ai160.com",
-    "api_url_angelbell": "http://web-api.lingjiao.cn",
     "api_url": "https://talenkid.lingjiao.cn",
-    "api_url_light": "http://light-angelbell-web.lingjiao.cn",
-    "api_url_inst": "http://lj-demo-web.ai160.com",
-    "api_url_old_1": "http://2btv.efunbox.cn",
-    "api_url_old_2": "http://2blj.api.ai160.com",
-    "api_url_old_3": "http://lj-web.api.ai160.com",
-    "api_url_local": "http://192.168.1.206:8600",
-    "api_url_mock": "http://127.0.0.1:8082/efunbox-to-b/1.0.0/lib/mockapi/"
+    "api_url_test": "http://tt-web.ai160.com"
 }

+ 11 - 0
src/stage/index/index.html

@@ -70,6 +70,17 @@
 		var globalUseDurationRecord = 0;
 		setInterval('globalUseDurationRecord += 1', 1000);
 	</script>
+	<script>
+		//解决startsWith、endsWith在webview上不能使用问题
+		String.prototype.startsWith=function(str){
+			var reg=new RegExp("^"+str);
+			return reg.test(this);
+		}
+		String.prototype.endsWith=function(str){
+			var reg=new RegExp(str+"$");
+			return reg.test(this);
+		}
+	</script>
 </body>
 
 </html>

+ 6 - 2
src/stage/index/scene/LessonScene.js

@@ -149,7 +149,7 @@ class LessonScene extends scene {
                   <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>
+                    <div class="transparent-btn">暂停</div>
                   </div>
                 `;
     			document.getElementById('view-bottom').innerHTML = videoViewDom;
@@ -235,12 +235,16 @@ class LessonScene extends scene {
     			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">${this.videoPlayer.playStatus() ? "暂停" : "播放"}</div>
+                    <div class="transparent-btn">${playText}</div>
                   </div>
                 `;
     			document.getElementById('view-bottom').innerHTML = videoViewDom;

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

@@ -87,7 +87,7 @@ class VideoWareFullScreenScene extends scene {
         const { list, type, title } = wareItem;
         let playUrl = '';
         if (list.length > 0) {
-          playUrl = videoUrlFormat(list[0].url);
+          playUrl = Utils.videoUrlFormat(list[0].url);
         }
         if (window.efunbox) {
         	window.efunbox.initAndroidPlayer(

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

@@ -1,4 +1,4 @@
-#ImageWareFullScreen {
+#wareImg {
 	position: absolute;
 	left: 0;
 	top: 0;

+ 1 - 1
src/util/Consts.js

@@ -12,7 +12,7 @@ class Consts {
 
 //图片/视频资源域名
 Consts.IMG_PATH = 'https://efunimgs.ai160.com';
-Consts.VIDEO_PATH = 'https://efunvideo.ai160.com/vs2m';
+Consts.VIDEO_PATH = 'https://efunvideo.ai160.com';
 
 //图片/视频资源类型代号
 Consts.TYPE_VIDEO = 0;

+ 25 - 25
src/util/Utils.js

@@ -152,13 +152,13 @@ class Utils {
        return format;
     }
 
-  static trimJsonStr(src){
-    //所有"'" 替换为"\""
-    if(typeof(src) == "string"){
-      return src.replace(new RegExp("'","gm"), "\"");
+    static trimJsonStr(src){
+        //所有"'" 替换为"\""
+        if(typeof(src) == "string"){
+            return src.replace(new RegExp("'","gm"), "\"");
+        }
+        return src;
     }
-    return src;
-  }
 
 	/**
 	 * @desc uuid生成器
@@ -187,25 +187,25 @@ class Utils {
 		return uuid.join('');
 	}
 
-  static getUuidForWeb() {
-    const uuid = Utils.uuid(32);
-    const start = uuid.slice(0,8);
-    const next = uuid.slice(8,12);
-    const nextNext = uuid.slice(13,17);
-    const last = uuid.slice(17,32);
-    return `${start}-${next}-${nextNext}-${last}`;
-  }
-
-  static videoUrlFormat(url) {
-      if (!url) { return; }
-      if (url.startsWith('http')) {
-          return url.replace('http://ljvideo', 'https://efunvideo');
-      } else if (url.startsWith('https')) {
-          return url;
-      } else {
-          return url;
-      }
-  }
+    static getUuidForWeb() {
+        const uuid = Utils.uuid(32);
+        const start = uuid.slice(0,8);
+        const next = uuid.slice(8,12);
+        const nextNext = uuid.slice(13,17);
+        const last = uuid.slice(17,32);
+        return `${start}-${next}-${nextNext}-${last}`;
+    }
+
+    static videoUrlFormat(url) {
+        if (!url) { return; }
+        if (url.startsWith('http')) {
+            return url.replace('http://ljvideo.ai160.com', Consts.VIDEO_PATH);
+        } else if (url.startsWith('https')) {
+            return url;
+        } else {
+            return url;
+        }
+    }
 }
 
 export default Utils;