|
@@ -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';
|
|
|
|