<!DOCTYPE html>
<html>

<head>
    <title>
        <%= htmlWebpackPlugin.options.productName %>
    </title>

    <meta charset="utf-8">
    <meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

    <link rel="icon" type="image/png" sizes="128x128" href="statics/icons/favicon-128x128.png">
    <link rel="icon" type="image/png" sizes="96x96" href="statics/icons/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
    <link rel="icon" type="image/ico" href="statics/icons/favicon.ico">
    <!-- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/zh_CN/sdk.js#xfbml=1&version=v7.0" nonce="bDrSmWhp"></script> -->
    <!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script> -->
    <script src="https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script>
    <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
    <script>
        function countryCb(r) {
            if (!r) {
                loadScriptString('https://maps.googleapis.com/maps/api/js?key=AIzaSyCvRZN9lGl3y3EsM0A0sWPf1pZ2olGsyNg&callback=Function.prototype')
                setTimeout(() => {
                    loadScriptString('https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/1.0.0.1/mark.js')
                }, 1000);
            } else {

                loadScriptString('https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc')
            }

        }

        function loadScriptString(code) {
            var script = document.createElement("script"); //创建一个script标签
            script.type = "text/javascript";
            script.src = code
            document.getElementsByTagName('head')[0].appendChild(script);
        }

        function isInChina() {
            let that = this
            var url = '//graph.facebook.com/feed?callback=h';
            var xhr = new XMLHttpRequest();
            var called = false;
            xhr.open('GET', url);
            xhr.onreadystatechange = function() {
                if (xhr.readyState === 4 && xhr.status === 200) {
                    called = true;
                    that.countryCb(false);
                }
            };
            xhr.send();
            // timeout 1s, this facebook API is very fast.
            setTimeout(function() {
                if (!called) {
                    xhr.abort();
                    that.countryCb(true);
                }
            }, 1000);
        }
        window.onload = function() {
            isInChina()
        }
    </script>
</head>

<body>

    <!-- DO NOT touch the following DIV -->
    <div id="q-app"></div>
</body>

</html>