Ver código fonte

:twisted_rightwards_arrows: Merge branch 'dev_base' into online_weichuang

zhanghe 6 anos atrás
pai
commit
e6a53226d4

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
src/lib/js/core.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 3 - 0
src/lib/js/hls.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
src/lib/js/md5.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
src/lib/js/sha1.min.js


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

@@ -11,24 +11,28 @@
 <body>
 	<script>
 		(function (doc, win) {
+			//用原生方法获取用户设置的浏览器的字体大小(兼容ie)
+		  if (doc.documentElement.currentStyle) {
+		    var user_webset_font = doc.documentElement.currentStyle['fontSize'];
+		  }
+		  else {
+		    var user_webset_font = getComputedStyle(doc.documentElement, false)['fontSize'];
+		  }
+			//取整后与默认16px的比例系数
+		  var xs = parseFloat(user_webset_font) / 16;
 			var docEl = doc.documentElement, //根元素html
-				//判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
-				resizeEvt = 'orientationchange' in window ?
-					'orientationchange' :
-					'resize',
-				recalc = function () {
-					var clientWidth = docEl.clientWidth;
-					if (!clientWidth) {
-						return;
-					}
-					//把document的fontSize大小设置成跟窗口成一定比例的大小,从而实现响应式效果。
-					docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
-					// console.log((120 * (clientWidth / 1920)) * 0.2);
-				};
-			//alert(docEl)
-			if (!doc.addEventListener) {
-				return;
-			}
+			//判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
+			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
+			recalc = function () {
+				var clientWidth = docEl.clientWidth;
+				if (!clientWidth) return;
+				if (clientWidth < 1920) {
+					docEl.style.fontSize = 100 * (clientWidth / 1920) / xs + 'px';
+				} else {
+					docEl.style.fontSize = 100 + 'px';
+				}
+			};
+			if (!doc.addEventListener) return;
 			win.addEventListener(resizeEvt, recalc, false); //addEventListener事件方法接受三个参数:第一个是事件名称比如点击事件onclick,第二个是要执行的函数,第三个是布尔值
 			doc.addEventListener('DOMContentLoaded', recalc, false) //绑定浏览器缩放与加载时间
 		})(document, window);
@@ -43,19 +47,15 @@
 			eid.dispatchEvent(evt);
 		}
 	</script>
-	<!-- <script src="http://g.alicdn.com/de/alitv-debug/1.1.10/index.min.js"></script> -->
-	<script src="https://cdn.bootcss.com/crypto-js/3.1.9/core.min.js"></script>
-	<script src="https://cdn.bootcss.com/crypto-js/3.1.9/sha1.min.js"></script>
-	<script src="https://cdn.bootcss.com/crypto-js/3.1.9/md5.min.js"></script>
-	<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
+	<script src="http://g.alicdn.com/de/alitv-debug/1.1.10/index.min.js"></script>
 	<script src="../../lib/js/FocusEngine.min.js"></script>
 	<script src="../../lib/js/blitz.js"></script>
 	<script src="../../lib/js/moye.min.js"></script>
 	<script src="../../lib/js/TVUtil.min.js"></script>
-	<!-- <script src="https://cdn.ravenjs.com/3.23.2/raven.min.js"></script> -->
-	<!-- <script>
-		Raven.config('https://a9383032420e44af813de59554b62c24@sentry.io/304059').install();
-	</script> -->
+	<script src="../../lib/js/core.min.js"></script>
+	<script src="../../lib/js/sha1.min.js"></script>
+	<script src="../../lib/js/md5.min.js"></script>
+	<script src="../../lib/js/hls.js"></script>
 	<script>
 		var ts = '201802051925';
 

+ 3 - 1
src/stage/index/style/LoginScene.less

@@ -53,7 +53,8 @@
 
 				& > input {
 					width: 100%;
-					height: 0.7rem;
+					height: 100%;
+					display: block;
 					border: 0;
 					line-height: 0.7rem;
 					font-size: 0.3rem;
@@ -86,6 +87,7 @@
 				& > input {
 					width: 100%;
 					height: 100%;
+					display: block;
 					border: 0;
 					line-height: 0.7rem;
 					font-size: 0.3rem;