Browse Source

初始化

udream-cxs 4 years ago
commit
f33ab2054e
8 changed files with 3329 additions and 0 deletions
  1. 11 0
      css/animate.min.css
  2. 62 0
      download.html
  3. BIN
      image/android.png
  4. BIN
      image/arrow.png
  5. BIN
      image/bg.png
  6. BIN
      image/ios.png
  7. 164 0
      index.html
  8. 3092 0
      js/jquery-2.1.0.min.js

File diff suppressed because it is too large
+ 11 - 0
css/animate.min.css


+ 62 - 0
download.html

@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=0">
+    <title>下载</title>
+    <script>
+		function resizeFontsize(){
+            var width = document.documentElement.clientWidth;
+            document.documentElement.style.fontSize = width/3.75+'px'; 
+		}
+		resizeFontsize();
+		window.addEventListener('orientationchange',resizeFontsize);
+		window.addEventListener('resize',resizeFontsize);
+	</script>
+    <style>
+        * {
+            padding: 0;
+            margin:0
+        }
+        body {
+            height: 100vh;
+        }
+        .bg {
+            height: 3.35rem;
+            background: url("image/bg.png") center / 100% 100%  no-repeat;
+        }
+        .ios ,.android {
+            width: 2.82rem;
+            height:0.52rem;
+            margin: .4rem auto;
+        }
+        img {
+            width: 100%;
+            height:100%;
+            display: block;
+        }
+    </style>
+</head>
+<body>
+    <div class="bg"></div>
+    <div class="ios">
+        <img src="image/ios.png" alt="">
+    </div>
+    <div class="android">
+        <img src="image/android.png" alt="">
+    </div>
+<script src="js/jquery-2.1.0.min.js"></script>
+</body>
+</html>
+<script>
+    
+    $(".ios").click(function() {
+        alert("暂无下载");
+        // window.location.href = 'itms-services://?action=download-manifest&url=https://lift.whlhcx.com/a.plist';			
+	});	
+    $(".android").click(function() {
+        alert("暂无下载");
+        // window.location.href = 'http://lift.whlhcx.com/a.apk';			
+	});	
+</script>

BIN
image/android.png


BIN
image/arrow.png


BIN
image/bg.png


BIN
image/ios.png


+ 164 - 0
index.html

@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=0">
+    <title>跳转</title>
+    <link rel="stylesheet" href="./css/animate.min.css">
+    <script>
+        function resizeFontsize() {
+            var width = document.documentElement.clientWidth;
+            document.documentElement.style.fontSize = width / 3.75 + 'px';
+        }
+        resizeFontsize();
+        window.addEventListener('orientationchange', resizeFontsize);
+        window.addEventListener('resize', resizeFontsize);
+    </script>
+    <style>
+        .zIndex {
+            display: none;
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 100%;
+            z-index: 999;
+            /* height: 100%; */
+            height: 100vh;
+            background-color: rgba(0, 0, 0, .8);
+        }
+
+        .word {
+            font-size: 16px;
+            text-align: center;
+            margin: .7rem auto 0;
+            color: aliceblue;
+        }
+
+        .arrow {
+            width: .85rem;
+            height: .55rem;
+            position: absolute;
+            top: .3rem;
+            right: 0.3rem;
+        }
+
+        .arrow img {
+            width: 100%;
+            height: 100%;
+            display: block;
+        }
+    </style>
+</head>
+
+<body>
+    <div class="jump" style="font-size: 16px;text-align: left;">正在跳转中,请稍后。。。(如未跳转请手动点击)</div>
+    <div class='zIndex'>
+        <div class="arrow">
+        <!-- <div class="arrow animated fadeInUp infinite delay-5s"> -->
+            <img src='./image/arrow.png' />
+        </div>
+        <div class="word">
+            在浏览器中打开
+        </div>
+    </div>
+    <script src="js/jquery-2.1.0.min.js"></script>
+</body>
+
+</html>
+<script language="javascript">
+    var id = getUrlParam("id");
+    var page = getUrlParam("page");
+    var time = new Date().getTime();
+    if (isWeiXin()) {
+        $('.zIndex').show()
+    } else {
+        init();
+    }
+    function init() {
+        if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
+             var loadDateTime = new Date();  
+             window.setTimeout(function() {  
+              var timeOutDateTime = new Date();  
+              if (timeOutDateTime - loadDateTime < 5000) {  
+               window.location.href = "https://dtgj.edtyun.com/h5/download.html";  
+              } else {  
+               window.close();  
+              }  
+             },  
+             25);  
+             window.location.href = `tytylift://dtgj.edtyun.com?page=${page}&id=${id}`;  
+            // var ifr = document.createElement("iframe");
+            // ifr.src = `tytylift://lift.whlhcx.com?page=${page}&id=${id}`;
+            // ifr.style.display = "none";
+            // document.body.appendChild(ifr);
+            // window.setTimeout(function () {
+            //     document.body.removeChild(ifr);
+            //     window.location.href = `http://lift.whlhcx.com/h5/download.html?${time}`;
+            // }, 2000)
+        } else if (navigator.userAgent.match(/android/i)) {
+            //  var state = null;  
+            //  try {  
+            //   state = window.location.href = `tytylift://lift.whlhcx.com?page=${page}&id=${id}`;  
+            // //   state = window.open(`tytylift://lift.whlhcx.com?page=${page}&id=${id}`, '_blank');  
+            //  } catch(e) {}  
+            //  if (state) {  
+            //   window.close();  
+            //  } else {  
+            //   window.location.href = `http://lift.whlhcx.com/h5/download.html?${time}`;  
+            //  }  
+            window.location.href = `tytylift://dtgj.edtyun.com?page=${page}&id=${id}`;
+            window.setTimeout(function () {
+                window.location.href = `http://dtgj.edtyun.com/h5/download.html?${time}`;
+            }, 2000);
+
+            // var loadDateTime = new Date();  
+            //  window.setTimeout(function() {  
+            //   var timeOutDateTime = new Date();  
+            //   if (timeOutDateTime - loadDateTime < 5000) {  
+            //    window.location.href = "http://lift.whlhcx.com/h5/download.html";  
+            //   } else {  
+            //    window.close();  
+            //   }  
+            //  },  
+            //  25);  
+            //  window.location.href = `tytylift://lift.whlhcx.com?page=${page}&id=${id}`; 
+        }
+    }
+
+    function getUrlParam(name) {
+        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
+        // var r = "http://lift.whlhcx.com/h5/index?id=132456&pass=iii&page=productDetail".split("?")[1].match(reg);  //匹配目标参数
+        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
+        // var r = window.location.herf.split("?")[1].match(reg);  //匹配目标参数
+        if (r != null) {
+			return unescape(r[2]); 
+		}
+		
+		
+		return null; //返回参数值
+    }
+
+    //判断是否是微信浏览器
+    function isWeiXin() {
+        //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
+        var ua = window.navigator.userAgent.toLowerCase();
+        console.log(ua)
+        //通过正则表达式匹配ua中是否含有MicroMessenger字符串
+        if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    $(".jump").click(function () {
+        
+        if (isWeiXin()) {
+            $('.zIndex').show()
+        } else {
+            init();
+        }
+    });	
+</script>

File diff suppressed because it is too large
+ 3092 - 0
js/jquery-2.1.0.min.js