<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>
    <title>404 - 搜狐快站</title>
    <style type="text/css">
        body{font-family:"\5FAE\8F6F\96C5\9ED1",Helvetica;background:#fff}body,div,header,img,p{margin:0;padding:0;list-style:none}#container{width:240px;margin:auto}header{margin-top:33px;text-align:center;line-height:30px;font-size:18px;font-weight:700;color:#666}.title{color:#333;text-align:center;padding:20px 0}.info{padding:10px 20px;font-size:14px;color:#676767;line-height:24px;margin:auto;text-align:center}.info p a{color:#004276;text-decoration:none}
    </style>
</head>
<body>
<div id="container">
    <header>
        <img src="http://cdn.kuaizhan.com/res/skin/images/mobile-404.png?v=4.9"/>
    </header>
    <div class="title">404: 页面没有找到</div>
    <div class="info"></div>
</div>
<script>
    function isInWx() {
        var ua = window.navigator.userAgent.toLowerCase();
        return ua.indexOf("micromessenger") !== -1;
    }
    function isMobile() {
        var mobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
        return mobile != null
    }
    (function(i,s,o,g,r,a,m) {
        i['KZAnalyticsObject'] = r; i[r] = i[r] || function() {(i[r].q = i[r].q || []).push(arguments);};
        a = s.createElement(o); m = s.getElementsByTagName(o)[0]; a.sync = 1; a.src = g;
        m.parentNode.insertBefore(a, m);
    })(window, document, "script", "//pv.kuaizhan.com/kzcollector.min.js?version=0.1", "kaq");

    var siteId, pageType;
    if (isMobile()) {
        siteId = "7498033947";
        pageType = isInWx() ? "wx" : "wap";
    } else {
        pageType = "pc";
        siteId = "7370759127";
    }

    // 统计
    kaq('create', siteId);
    kaq('set', 'pageType', pageType === "wap" ? "101" : "0");
    kaq('set', 'traceKey', window.location.hostname);
    kaq('send', 'pageview');

    var url = "https://stat.kuaizhan.com/api/v1/promotes/404?" +
        "host=" + window.location.hostname +
        "&type=" + pageType;
    fetch(url)
        .then(function (response) {
            return response.json()
        }).then(function (data) {
        console.log(data)
        if (data.code === 200 && data.data.url) {
            document.getElementsByClassName("info")[0].innerHTML = "三秒钟后将跳到广告页面..."
            setTimeout(function () {
                window.location.href = data.data.url;
            }, 800)
        }
    })
</script>
</body>
</html>
