wrong.html 2.9 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <script src="../../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../../assets/css/api.css"/>
    <link rel="stylesheet" href="../../assets/css/index.css">
    <link rel="stylesheet" href="../../assets/css/doc.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        .wrong_box {
            position: fixed;
            height: 100%;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-direction: column;
            color: #424242;
        }

        .wrong_box img {
            width: 20%;
        }

        .reload {
            width: 30%;
            padding: 0.25rem 0;
            text-align: center;
            margin: 0.3rem auto;
            background-color: #D8B25F;
            font-size: 14px;
            color: #fff;
            border-radius: 0.1rem;
        }

        .wrong {
            padding: 0.2rem 0;
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="wrong_box">
        <img src="../../assets/image/loading.gif" alt="">
        <span class="wrong">网络小短腿似乎跑不动了...</span>
        <span @click="reLoad" class="reload">{{text}}</span>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            text: '重新加载'
        },
        created: function () {
            apiready = function () {
                setTimeout(function() {
                    api.openWin({
                        name: 'index_win',
                        url: './index_win.html',
                    });
                }, 3000)
            }
        },
        methods: {
            reLoad: function () {
                app.text = '加载中...';
                setTimeout(function() {
                    api.openWin({
                        name: 'index_win',
                        url: './index_win.html',
                    });
                }, 2000)
            }
        }
    })
</script>