Ver código fonte

Revert "Merge branch 'dev_layout_adjust' into dev_winpc_touch"

This reverts commit 9be99d0922dc4cd38e417572b0a93650d6bd9ad2, reversing
changes made to 67d603557eb906eb719fc0a67fe98acc2ef2c16d.
zhanghe 6 anos atrás
pai
commit
af97c47b9e
33 arquivos alterados com 206 adições e 126 exclusões
  1. 1 0
      src/res/tpl/CLScene.tpl
  2. 3 0
      src/res/tpl/CourseScene.tpl
  3. 1 0
      src/res/tpl/DataBuildingScene.tpl
  4. 3 0
      src/res/tpl/DownloadScene.tpl
  5. 1 0
      src/res/tpl/IndexScene.tpl
  6. 3 0
      src/res/tpl/QuitConfirmScene.tpl
  7. 1 0
      src/res/tpl/ShopCartScene.tpl
  8. 3 1
      src/res/tpl/SplashScene.tpl
  9. 3 0
      src/res/tpl/TerminalScene.tpl
  10. 1 1
      src/stage/index/index.html
  11. 1 4
      src/stage/index/index.less
  12. 3 3
      src/stage/index/scene/CourseScene.js
  13. 6 11
      src/stage/index/scene/DataBuildingScene.js
  14. 1 1
      src/stage/index/scene/TerminalScene.js
  15. 3 3
      src/stage/index/style/BuyConfirmScene.less
  16. 19 9
      src/stage/index/style/CLScene.less
  17. 21 8
      src/stage/index/style/CourseScene.less
  18. 18 9
      src/stage/index/style/DataBuildingScene.less
  19. 3 3
      src/stage/index/style/DelConfirmScene.less
  20. 3 6
      src/stage/index/style/DownloadScene.less
  21. 5 9
      src/stage/index/style/GlobalGoodDetail.less
  22. 2 2
      src/stage/index/style/ImageWareFullScreen.less
  23. 24 6
      src/stage/index/style/IndexScene.less
  24. 3 3
      src/stage/index/style/LessonScene.less
  25. 4 4
      src/stage/index/style/LoginScene.less
  26. 19 10
      src/stage/index/style/QuitConfirmScene.less
  27. 3 3
      src/stage/index/style/RepeatLoginScene.less
  28. 3 3
      src/stage/index/style/ShopCartCheckScene.less
  29. 16 7
      src/stage/index/style/ShopCartScene.less
  30. 8 9
      src/stage/index/style/SplashScene.less
  31. 19 8
      src/stage/index/style/TerminalScene.less
  32. 2 2
      src/stage/index/style/VideoWareFullScreen.less
  33. 0 1
      src/util/API/AJAXHelper.js

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

@@ -1,4 +1,5 @@
 <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">

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

@@ -1,4 +1,7 @@
 <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 - 0
src/res/tpl/DataBuildingScene.tpl

@@ -1,4 +1,5 @@
 <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>

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

@@ -1,4 +1,7 @@
 <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>

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

@@ -1,4 +1,5 @@
 <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">

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

@@ -1,4 +1,7 @@
 <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="" />

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

@@ -1,4 +1,5 @@
 <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>

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

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

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

@@ -1,4 +1,7 @@
 <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, user-scalable=no">
+	<meta name="viewport" content="width=1920,user-scalable=0">
 	<title>双师教学标准平台</title>
 	<link rel="stylesheet" href="../../lib/css/base.css" />
 </head>

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

@@ -1,15 +1,12 @@
 @charset 'utf-8';
 
-@g-width: 19.2;
-@g-height: 10.8;
-
 @borderSize: 0.05;
 @borderRadius: 0.2;
 
 body {
     width: 100%;
     height: 100%;
-    background-color: #f5f5f5;
+    background-color: #000;
 }
 
 /*@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('CourseScene');
+			let courseBG = document.getElementById('course-bg');
 			let collect = document.querySelector('#course-tab-collect');
 			// 1. set shopcart count
 			ShopCartState.getCount();
 			// 2. set backgroundImg
-			if (bgUrl && courseBG) {
-				courseBG.style.backgroundImage = `url(${Consts.IMG_PATH}/${bgUrl})`;
+			if (bgUrl) {
+				courseBG.setAttribute('src', `${Consts.IMG_PATH}/${bgUrl}`)
 			}
 			// 3. set breadCrumb
 			topBreadCrumb.innerHTML = breadCrumb;

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

@@ -7,17 +7,12 @@ class DataBuildingScene extends scene {
 
     onCreate(data) {
   		this.setContentView(require('../../../res/tpl/DataBuildingScene.tpl'), {}, 'DataBuildingScene', {}, () => {
-            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}`;
-                }
-            }
-        });
+        if (data && data.bgUrl) {
+            document.getElementById('building-pic-bg').setAttribute('src', Consts.IMG_PATH + '/' + data.bgUrl);
+        } else {
+            document.getElementById('building-pic-bg').setAttribute('src', 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>`;

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

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

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

@@ -3,15 +3,25 @@
 @import './component/CourseItem.less';
 
 #CLScene {
-	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;
+    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%;
+  		}
+  	}
 
     #cl-left-panel {
         float: left;

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

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

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

@@ -1,11 +1,20 @@
 #DataBuildingScene {
-	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;
+    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%;
+    }
 }

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

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

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

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

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

@@ -1,15 +1,11 @@
 @import "./Mixins.less";
 
 #GlobalGoodDetailScene {
-	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;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    background: url('./assets/img/GlobalGoodDetail/background.jpg') center no-repeat;
+    background-size: 100% 100%;
 
     .control-panel {
         float: right;

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

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

+ 24 - 6
src/stage/index/style/IndexScene.less

@@ -49,15 +49,32 @@
 
 #IndexScene {
 	position: absolute;
-	width: unit(@g-width, rem);
-	height: unit(@g-height, rem);
-	left: 0;
-	top: 0;
+	width: 100%;
+	height: 100%;
 	padding: 0.05rem 1.2rem 0;
+<<<<<<< HEAD
 	background-image: url('assets/img/IndexScene/background.jpg');
 	background-size: cover;
 	background-repeat: no-repeat;
 	overflow: hidden;
+=======
+
+	.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%;
+		}
+	}
+>>>>>>> parent of 9be99d0... Merge branch 'dev_layout_adjust' into dev_winpc_touch
 
 	.m-header-user{
 		height: 0.96rem;
@@ -71,12 +88,13 @@
 			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;
+<<<<<<< HEAD
             position: relative;
 			border: solid unit(@borderSize, rem) transparent;
+=======
+>>>>>>> parent of 9be99d0... Merge branch 'dev_layout_adjust' into dev_winpc_touch
 
 			.user-info-text {
 				float: left;

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

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

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

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

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

@@ -1,14 +1,23 @@
 #QuitConfirmScene {
-	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;
-
+    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%;
+        }
+    }
 	.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: unit(@g-width, rem);
-	height: unit(@g-height, rem);
-	background-color: rgba(0, 0, 0, .7);
+	width: 100%;
+	height: 100%;
+	background-color: rgba(0, 0, 0, .6);
 	z-index: 2;
 
 	.prompt-wrapper {

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

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

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

@@ -3,15 +3,24 @@
 
 #ShopCartScene {
 	position: absolute;
-	left: 0;
 	top: 0;
-	width: unit(@g-width, rem);
-	height: unit(@g-height, rem);
+	left: 0;
+	width: 100%;
+	height: 100%;
 	overflow: hidden;
-	background-image: url('assets/img/ShopCartScene/shop_cart_bg.jpg');
-	background-size: cover;
-	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 {
 		position: absolute;
 		top: .7rem;

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

@@ -1,11 +1,10 @@
 #SplashScene {
-	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;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+
+    img {
+        width: 100%;
+        height: 100%;
+    }
 }

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

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

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

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

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

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