<html lang="zh">

<head>
    <title>{{.title}}</title>
    <link rel="stylesheet" href="/static/style/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/style/content-style.css">
    <script src="/static/style/jquery.min.js"></script>

    <script src="/static/style/bootstrap/js/bootstrap.min.js"></script>

</head>
<body>
<br/><br/><br/><br/><br/><br/><br/>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-default">
                <div class="panel-body center">
                    <h3 align="center">{{.message}}</h3>
                    <hr/>
                    <div align="center">
                        <a class="btn btn-danger btn-big" id="err_redirect" href="{{.redirect}}"> 返回 </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
//    var isInPopup = self != top;
    var isInPopup = $("body").hasClass("layui-layer");
    var redirect = $('#err_redirect').attr('href') || "/";
    if(isInPopup) {
        $("a").click( function () { parent.$.layer.close(); });
        setTimeout(function(){parent.$.layer.close();}, 2000);
    } else {
        setTimeout('(function(uri) {location.href = uri;})(redirect)', 2000);
    }
</script>
</body>
</html>
