DEV.html 4.27 KB
<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=375,maximum-scale=1.3,user-scalable=no">
    <title>下载</title>
    <style>
        .main-box {
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .type-logo {
            width: 24px;
            height: 24px;
            margin-top: 20px;
        }

        #down-btn {
            width: 260px;
            height: 50px;
            border-radius: 100px;
            background-image: linear-gradient(-180deg, #3356ff 0%, #3399ff 100%);
            margin-top: 24px;
            line-height: 50px;
            text-align: center;
            font-size: 18px;
            color: #fff
        }

        #loading-img {
            width: 30px;
            height: 30px;
            margin-top: 24px;
        }

        #loaded-text {
            font-size: 16px;
            color: #3399ff;
            margin-top: 24px;
        }

        .hide {
            display: none
        }

        .wx-tip {
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            position: fixed;
            left: 0;
            top: 0;
            z-index: 998;
            display: none;
        }

        .wx-tip-icon {
            width: 68px;
            height: 60px;
            background: url(./images/guide@2x.png) no-repeat center;
            display: block;
            position: absolute;
            right: 20px;
            top: 20px;
        }

        .wx-txt-outter {
            margin-top: 107px;
            display: flex;
            flex-direction: row;
            justify-content: center;
        }

        .wx-txt-inner {
            display: flex;
            flex-direction: column;
        }

        .wx-tip-txt {
            color: #fff;
            font-size: 16px;
            line-height: 2;
            margin: 0;
        }
    </style>
    <script>
        function is_weixn() {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == "micromessenger") {
                return true;
            } else {
                return false;
            }
        }

        function downloadApp() {
            if (is_weixn()) {
                window.event ? window.event.returnValue = false : e.preventDefault();
                document.getElementById('JweixinTip').style.display = 'block';
                document.getElementById('JweixinTip').onclick = function() {
                    this.style.display = 'none';
                };
            } else {
                window.location.href = '{json_apk_url}';
                document.getElementById('down-btn').className = 'hide';
                document.getElementById('loading-img').className = '';
                setTimeout(function() {
                    document.getElementById('loading-img').className = 'hide';
                    document.getElementById('loaded-text').className = '';
                }, 3000);
            }
        }
    </script>
</head>

<body class="main-box">
    <img src="./images/logo@2x.png" style="width:375px" alt="logo">
    <img src="./images/android.png" id="android" class="type-logo" alt="logo">
    <!--<img src="./images/android.png" id="android" class="type-logo" alt="logo">-->
    <!--<span style="margin-top:12px;color:#666;font-size:14px">{json_shortVersion}(Bulid {json_buildVersion})</span>-->
    <!--<span style="color:#666;font-size:14px">更新于:2018-03-31 08:38</span>-->
    <div id="down-btn" onclick="return downloadApp()">下载安装</div>
    <img src="./images/loading.gif" id="loading-img" class="hide" alt="loading" />
    <p id="loaded-text" class="hide">下载中...</p>

    <div class="wx-tip" id="JweixinTip">
        <span class="wx-tip-icon"></span>
        <div class="wx-txt-outter">
            <div class="wx-txt-inner">
                <p class="wx-tip-txt">点击右上角</p>
                <p class="wx-tip-txt">选择在浏览器中打开</p>
            </div>
        </div>
    </div>
</body>

</html>