Browse Source

:twisted_rightwards_arrows: Merge branch 'dev_base' into online_kid_web

zhanghe 6 years ago
parent
commit
0673a37e9d
34 changed files with 135 additions and 209 deletions
  1. 0 1
      src/res/tpl/CLScene.tpl
  2. 0 3
      src/res/tpl/CourseScene.tpl
  3. 1 6
      src/res/tpl/DataBuildingScene.tpl
  4. 0 3
      src/res/tpl/DownloadScene.tpl
  5. 0 1
      src/res/tpl/IndexScene.tpl
  6. 0 3
      src/res/tpl/QuitConfirmScene.tpl
  7. 0 1
      src/res/tpl/ShopCartScene.tpl
  8. 1 3
      src/res/tpl/SplashScene.tpl
  9. 0 3
      src/res/tpl/TerminalScene.tpl
  10. 1 1
      src/stage/index/index.html
  11. 4 1
      src/stage/index/index.less
  12. 3 3
      src/stage/index/scene/CourseScene.js
  13. 11 6
      src/stage/index/scene/DataBuildingScene.js
  14. 1 1
      src/stage/index/scene/TerminalScene.js
  15. 2 2
      src/stage/index/style/AudioWareFullScreen.less
  16. 3 3
      src/stage/index/style/BuyConfirmScene.less
  17. 9 19
      src/stage/index/style/CLScene.less
  18. 8 21
      src/stage/index/style/CourseScene.less
  19. 9 18
      src/stage/index/style/DataBuildingScene.less
  20. 3 3
      src/stage/index/style/DelConfirmScene.less
  21. 6 3
      src/stage/index/style/DownloadScene.less
  22. 9 5
      src/stage/index/style/GlobalGoodDetail.less
  23. 2 2
      src/stage/index/style/ImageWareFullScreen.less
  24. 11 18
      src/stage/index/style/IndexScene.less
  25. 3 3
      src/stage/index/style/LessonScene.less
  26. 4 4
      src/stage/index/style/LoginScene.less
  27. 10 19
      src/stage/index/style/QuitConfirmScene.less
  28. 3 3
      src/stage/index/style/RepeatLoginScene.less
  29. 3 3
      src/stage/index/style/ShopCartCheckScene.less
  30. 7 16
      src/stage/index/style/ShopCartScene.less
  31. 9 8
      src/stage/index/style/SplashScene.less
  32. 8 19
      src/stage/index/style/TerminalScene.less
  33. 2 2
      src/stage/index/style/TrainingScene.less
  34. 2 2
      src/stage/index/style/VideoWareFullScreen.less

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

@@ -1,5 +1,4 @@
 <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="name-text"></div>
         <div id="cl-left-tab-scroll" fe-role="Scroll" fe-cfg="scroll_dir:v">

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

@@ -1,7 +1,4 @@
 <div id="CourseScene" class="course clearfix" fe-role="Switch">
-	<div class="course-bg">
-		<img id="course-bg" src="assets/img/CourseScene/bg.jpg">
-	</div>
 	<div class="header">
 		<div class="course-name" id="course-name"></div>
 		<div class="nav" fe-role="Switch" id="course-nav">

+ 1 - 6
src/res/tpl/DataBuildingScene.tpl

@@ -1,6 +1 @@
-<div id="DataBuildingScene" fe-role="Switch">
-    <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 id="DataBuildingScene" fe-role="Switch"></div>

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

@@ -1,7 +1,4 @@
 <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">
     	<img src="assets/img/DownloadScene/download.png" alt="" />
     	<div>本地下载列表</div>

+ 0 - 1
src/res/tpl/IndexScene.tpl

@@ -1,5 +1,4 @@
 <div id="IndexScene" fe-role="Switch">
-	<div class="index-bg"><img src="assets/img/IndexScene/background.jpg" alt=""></div>
  	<div class="m-header-user" fe-role="Switch">
 		<div fe-role="Widget" class="user-info" id="user-info">
 			<div class="user-info-text">

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

@@ -1,7 +1,4 @@
 <div id="QuitConfirmScene" fe-role="Switch">
-    <div class="quit-app-bg">
-        <img src="http://ljimgs.ai160.com/2b/app_resource/app_quit_confirm_1116.jpg" alt="" />
-    </div>
     <div class="btn-select-wrapper">
         <div id="ret-btn" class="cancel" fe-role="Widget">
             <img src="assets/img/QuitConfirmScene/focusIcon.png" alt="" />

+ 0 - 1
src/res/tpl/ShopCartScene.tpl

@@ -1,5 +1,4 @@
 <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>
 	<div id="cart-empty" class="cart-empty">
 		<p class="empty-text">还没有添加商品</p>

+ 1 - 3
src/res/tpl/SplashScene.tpl

@@ -1,3 +1 @@
-<div id="SplashScene" fe-role="Switch">
-    <img src="assets/img/SplashScene/splash.jpg" alt="">
-</div>
+<div id="SplashScene" fe-role="Switch"></div>

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

@@ -1,7 +1,4 @@
 <div id="TerminalScene" fe-role="Switch">
-	<div class="terminal-bg">
-		<img src="assets/img/TerminalScene/background.jpg" alt="">
-	</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 class="goback" fe-role="Widget">

+ 1 - 1
src/stage/index/index.html

@@ -3,7 +3,7 @@
 
 <head>
 	<meta charset="UTF-8">
-	<meta name="viewport" content="width=1920">
+	<meta name="viewport" content="width=1920, user-scalable=no">
 	<title>双师教学标准平台</title>
 	<link rel="stylesheet" href="../../lib/css/base.css" />
 </head>

+ 4 - 1
src/stage/index/index.less

@@ -1,12 +1,15 @@
 @charset 'utf-8';
 
+@g-width: 19.2;
+@g-height: 10.8;
+
 @borderSize: 0.05;
 @borderRadius: 0.2;
 
 body {
     width: 100%;
     height: 100%;
-    background-color: #000;
+    background-color: #f5f5f5;
 }
 
 /*@import '../../lib/css/marquee.css';*/

+ 3 - 3
src/stage/index/scene/CourseScene.js

@@ -72,13 +72,13 @@ class CourseScene extends scene {
 
 			const { auth, bgUrl, title, breadCrumb, collected, list } = res.data;
 			let topBreadCrumb = document.getElementById('course-name');
-			let courseBG = document.getElementById('course-bg');
+			let courseBG = document.getElementById('CourseScene');
 			let collect = document.querySelector('#course-tab-collect');
 			// 1. set shopcart count
 			ShopCartState.getCount();
 			// 2. set backgroundImg
-			if (bgUrl) {
-				courseBG.setAttribute('src', `${Consts.IMG_PATH}/${bgUrl}`)
+			if (bgUrl && courseBG) {
+				courseBG.style.backgroundImage = `url(${Consts.IMG_PATH}/${bgUrl})`;
 			}
 			// 3. set breadCrumb
 			topBreadCrumb.innerHTML = breadCrumb;

+ 11 - 6
src/stage/index/scene/DataBuildingScene.js

@@ -7,12 +7,17 @@ class DataBuildingScene extends scene {
 
     onCreate(data) {
   		this.setContentView(require('../../../res/tpl/DataBuildingScene.tpl'), {}, 'DataBuildingScene', {}, () => {
-        if (data && data.bgUrl) {
-            document.getElementById('building-pic-bg').setAttribute('src', Consts.IMG_PATH + '/' + data.bgUrl);
-        } else {
-            document.getElementById('building-pic-bg').setAttribute('src', 'asstes/img/building.png');
-        }
-      });
+            let targetDom = document.getElementById('DataBuildingScene');
+            if (data && data.bgUrl) {
+                if (targetDom) {
+                    targetDom.style.backgroundImage = `url(${Consts.IMG_PATH})/${data.bgUrl}`;
+                }
+            } else {
+                if (targetDom) {
+                    targetDom.style.backgroundImage = `url(${Consts.DATA_BUILDING}`;
+                }
+            }
+        });
     }
 
     onDestory() {

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

@@ -8,7 +8,7 @@ class TerminalScene extends scene {
 	}
 
 	renderTerminalList(dataset) {
-		let stu_no = `<li class="info-item"><div>号</div>:${dataset.eid.replace(/(\d{4})/g, '$1 ')}</li>`;
+		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>`;

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

@@ -2,8 +2,8 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
 	background-image: url(assets/img/icon.png);
 	background-size: 100% 100%;

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

@@ -2,9 +2,9 @@
 	position: absolute;
 	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
-	background-color: rgba(0, 0, 0, .5);
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	background-color: rgba(0, 0, 0, .7);
 	z-index: 2;
 
 	.toast {

+ 9 - 19
src/stage/index/style/CLScene.less

@@ -4,25 +4,15 @@
 @import './component/TrainingItem.less';
 
 #CLScene {
-    position: absolute;
-    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%;
-  		}
-  	}
+	position: absolute;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	left: 0;
+	top: 0;
+	background-image: url('assets/img/CLScene/background.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+	overflow: hidden;
 
     #cl-left-panel {
         float: left;

+ 8 - 21
src/stage/index/style/CourseScene.less

@@ -6,28 +6,15 @@
 
 #CourseScene {
 	position: absolute;
-	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	left: 0;
-	width: 100%;
-	height: 100%;
+	top: 0;
+	background-image: url('assets/img/CourseScene/bg.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
 	overflow: hidden;
 
-	.course-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%;
-		}
-	}
-
 	.header {
 		margin-top: 0.3rem;
 		height: 1.15rem;
@@ -187,7 +174,7 @@
 			top: 2rem;
 			left: 0;
 			width: 100%;
-			padding: 0.28rem 1.43rem 0;
+			padding: 0.28rem 1.75rem 0;
 			margin-top: .5rem;
 			overflow: hidden;
 			height: 8.8rem;
@@ -200,7 +187,7 @@
 					position: relative;
 					box-shadow: 0.03rem 0.03rem 0.1rem rgba(0, 0, 0, 0.3);
 					float: left;
-					width: 6.19rem;
+					width: 6.1rem;
 					height: 1.1rem;
 					line-height: 1.1rem;
 					overflow: hidden;

+ 9 - 18
src/stage/index/style/DataBuildingScene.less

@@ -1,20 +1,11 @@
 #DataBuildingScene {
-    position: absolute;
-    left: 0;
-    top: 0;
-    margin: 0;
-    padding: 0;
-    width: 100%;
-    height: 100%;
-    vertical-align: bottom;
-
-    img {
-        position: absolute;
-        left: 0;
-        top: 0;
-        margin: 0;
-        padding: 0;
-        width: 100%;
-        height: 100%;
-    }
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	overflow: hidden;
+	background-image: url('assets/img/default_bg.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
 }

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

@@ -2,9 +2,9 @@
 	position: absolute;
 	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
-	background-color: rgba(0, 0, 0, .5);
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	background-color: rgba(0, 0, 0, .7);
 	z-index: 2;
 
 	.toast {

+ 6 - 3
src/stage/index/style/DownloadScene.less

@@ -2,11 +2,14 @@
 
 #DownloadManagerScene {
 	position: absolute;
-	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
+	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
+	background-image: url('assets/img/GlobalGoodDetail/background.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
 	text-align: center;
 
 	.download-manager-bg {

+ 9 - 5
src/stage/index/style/GlobalGoodDetail.less

@@ -1,11 +1,15 @@
 @import "./Mixins.less";
 
 #GlobalGoodDetailScene {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    background: url('./assets/img/GlobalGoodDetail/background.jpg') center no-repeat;
-    background-size: 100% 100%;
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	overflow: hidden;
+	background-image: url('assets/img/GlobalGoodDetail/background.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
 
     .control-panel {
         float: right;

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

@@ -2,8 +2,8 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
 	background-image: url(assets/img/icon.png);
 	background-size: 100% 100%;

+ 11 - 18
src/stage/index/style/IndexScene.less

@@ -2,25 +2,15 @@
 
 #IndexScene {
 	position: absolute;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	left: 0;
+	top: 0;
 	padding: 0.05rem 1.2rem 0;
-
-	.index-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%;
-		}
-	}
+	background-image: url('assets/img/Indexscene/background.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+	overflow: hidden;
 
 	.m-header-user{
 		height: 0.96rem;
@@ -34,8 +24,11 @@
 			border-radius: 0.55rem;
 			padding-left: 0.2rem;
 			padding-right: 0.3rem;
+			padding-top: 0.1rem;
+			padding-bottom: 0.1rem;
 			margin-right: -0.3rem;
 			text-align: right;
+			border: solid unit(@borderSize, rem) transparent;
 
 			.user-info-text {
 				float: left;

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

@@ -4,11 +4,11 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
 	background-image: url("assets/img/LessonScene/background.jpg");
-	background-size: 100% 100%;
+	background-size: cover;
 	background-repeat: no-repeat;
 
 	#title {

+ 4 - 4
src/stage/index/style/LoginScene.less

@@ -15,12 +15,12 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
-	background-color: rgba(0, 0, 0, 0.1);
 	background-image: url('assets/img/LoginScene/background.png');
-	background-size: 100% 100%;
+	background-size: cover;
+	background-position: center;
 	background-repeat: no-repeat;
 
 	.formBox {

+ 10 - 19
src/stage/index/style/QuitConfirmScene.less

@@ -1,23 +1,14 @@
 #QuitConfirmScene {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    background-size: cover;
-    .quit-app-bg {
-        position: absolute;
-        left: 0;
-        top: 0;
-        width: 100%;
-        height: 100%;
-        z-index: -1;
-        img {
-            position: absolute;
-            top: 0;
-            left: 0;
-            width: 100%;
-            height: 100%;
-        }
-    }
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	overflow: hidden;
+	background-image: url('http://ljimgs.ai160.com/2b/app_resource/app_quit_confirm_1116.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+
 	.btn-select-wrapper {
         position: absolute;
         width: 40.6%;

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

@@ -2,9 +2,9 @@
 	position: absolute;
 	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
-	background-color: rgba(0, 0, 0, .6);
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	background-color: rgba(0, 0, 0, .7);
 	z-index: 2;
 
 	.prompt-wrapper {

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

@@ -2,9 +2,9 @@
 	position: absolute;
 	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
-	background-color: rgba(0, 0, 0, .5);
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	background-color: rgba(0, 0, 0, .7);
 	z-index: 2;
 
 	.toast {

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

@@ -3,24 +3,15 @@
 
 #ShopCartScene {
 	position: absolute;
-	top: 0;
 	left: 0;
-	width: 100%;
-	height: 100%;
+	top: 0;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
-
-	.cart-bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		z-index: -1;
-		width: 100%;
-		height: 100%;
-		img {
-			width: 100%;
-			height: 100%;
-		}
-	}
+	background-image: url('assets/img/ShopCartScene/shop_cart_bg.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+	
 	.cart-name {
 		position: absolute;
 		top: .7rem;

+ 9 - 8
src/stage/index/style/SplashScene.less

@@ -1,10 +1,11 @@
 #SplashScene {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-
-    img {
-        width: 100%;
-        height: 100%;
-    }
+	position: absolute;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	left: 0;
+	top: 0;
+	background-image: url('assets/img/SplashScene/splash.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+	overflow: hidden;
 }

+ 8 - 19
src/stage/index/style/TerminalScene.less

@@ -1,25 +1,14 @@
 #TerminalScene {
 	position: absolute;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
+	left: 0;
+	top: 0;
 	padding: 0 3.76rem;
-    background-size: cover;
-
-	.terminal-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%;
-		}
-	}
+	background-image: url('assets/img/TerminalScene/background.jpg');
+	background-size: cover;
+	background-repeat: no-repeat;
+	overflow: hidden;
 
 	.terminal-wrapper {
 		margin-top: 2.78rem;

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

@@ -2,8 +2,8 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
 	background-image: url(assets/img/icon.png);
 	background-size: 100% 100%;

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

@@ -2,8 +2,8 @@
 	position: absolute;
 	left: 0;
 	top: 0;
-	width: 100%;
-	height: 100%;
+	width: unit(@g-width, rem);
+	height: unit(@g-height, rem);
 	overflow: hidden;
   video {
     width: 100%;