<!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.0">
    <title>无法显示预期页面</title>
    <style>
        html,
        body,
        .container {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            height: 100%;
        }
        .img1{
            width: 100%;
        }
    </style>
</head>

<body>
    <div class="container">
        <img class="img1" src="https://tjfnew.china315net.com/image/2.jpg" />
        <p id="tips">服务器繁忙，请稍后再试！</p>
        <div style="max-width: 1000px;display: none;" id="wx_follow_step">
            <div>
                <div>1、根据微信版本要求，请检查是否允许网页获取个人信息。若页面底部出现如下内容（见下方图片），请选择<b>使用完整服务</b>。</div>
                <img src="https://tjfnew.china315net.com/image/wb.png" style="width: 100%;margin-top:10px" />
            </div>
            <div style="margin-top:10px">
                <div>2、清除微信缓存后重新扫码。</div>
            </div>
        </div>
    </div>
    <script>
        (function () {
            var oHtml = document.documentElement;
            function getSize() {
                var screenWidth = oHtml.clientWidth;
                console.log(screenWidth);
                if (screenWidth > 640) screenWidth = 640;
                oHtml.style.fontSize = screenWidth / 20 + 'px';
            }
            getSize();
            window.onresize = function () {
                getSize();
            };

            function isWeChat() {
                //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息，这个属性可以用来判断浏览器类型
                var ua = window.navigator.userAgent.toLowerCase();
                //通过正则表达式匹配ua中是否含有MicroMessenger字符串
                if (ua.match(/MicroMessenger/i) == 'micromessenger') {
                    return true;
                } else {
                    return false;
                }
            }

            if (isWeChat()) {
                document.getElementById('tips').innerText = '无法显示预期的页面！请检查以下两点：';
                document.getElementById('wx_follow_step').style.display = 'block';
            }
        })();


    </script>
</body>

</html>