admin管理员组

文章数量:1656605

下载app二维码扫码下载,当用户微信扫码下载时 微信不能直接下载应用,所以做了一个过渡界面给用户来交互响应。效果图如下图:

  html的源代码如下。

<!DOCTYPE html>
<!-- saved from url=(0049)http://upgrade.haogonge/inspection/index.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>大加安全</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .item {
            width: 50%;
            background: #55a9ff;
            border-radius: 5px;
            display: flex;
            color: #fff;
            margin: 0 auto;
            padding: 15px;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .item img {
            width: 30px;
            margin-left: 10px;
            margin-right: 10px;
        }

        .shadow {
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            background: rgba(0, 0, 0, .8);
            display: none;
            /* display: flex; */
            /* align-items: center; */
            /* justify-content: center; */
        }
        .pimg{
     position: absolute;
     left: 0;
     right: 0;
     top: 0;
     bottom: 0;
     width: 95%;
}
    </style>
</head>

<body>
    <div class="wrpaper">
        <img src="https://img-blog.csdnimg/2022010622474671413.png" alt="" style="width: 100%;">

        <p style="text-align: center;margin-bottom: 20px;color:#B0B0B0">版本号 :2.0.1</p>
        <p style="text-align: center;margin-bottom: 20px;color:#B0B0B0">苹果下载请在Safari浏览器中打开</p>

        <div class="item" id="an">
            <img src="https://img-blog.csdnimg/2022010622474670438.png" alt="">
            <span>安卓下载</span>
        </div>
        <div class="item" id="ios">
            <img src="https://img-blog.csdnimg/2022010622474652497.png" alt="">
            <span>苹果下载</span>
        </div>


    </div>

    <div class="shadow" id="shadow">
        <img src="https://img-blog.csdnimg/2022010622474643717.png" alt="" class="pimg">

    </div>

    <script type="text/javascript">
        var an = document.getElementById('an');
        var ios = document.getElementById('ios');
        var shadow = document.getElementById('shadow');
        shadow.addEventListener('click', () => {
            shadow.style.display = 'none'
        })
        ios.addEventListener('click', () => {
            if (isWeiXin()) {
                shadow.style.display = 'block'
            } else {
                window.location.href =
                    "itms-services://?action=download-manifest&url=https://upgrade.znhl360/inspection/inspection.plist";
            }
        })
        an.addEventListener('click', () => {
            if (isWeiXin()) {
                shadow.style.display = 'block'
            } else {
                window.location.href = "http://dev-images.znhl360/9f0217a5-a14c-46f6-8233-2553695dd7ce.apk?Expires=4740380446&OSSAccessKeyId=uLNfGQv1BKmp6K1n&Signature=Vzqko9N4Lgsf8KJ8TS2fNt1BUz8%3D";           }
        })

        function isWeiXin() {
            var ua = window.navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == 'micromessenger') {
                return true;
            } else {
                window.location.href = "https://www.haogonge"
                return false;
            }
        }
    </script>

</body></html>

本文标签: 界面代码微信扫码app