insurance_detial.html 3.6 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">
    <title></title>
    <script src="../../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../../assets/css/api.css"/>
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        header {
            width: 100%;
            height: auto;
            font-size: 18px;
        }

        .index_header {
            line-height: 0.44rem;
            color: #424242;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.24rem 0.42rem;
            border-bottom: 1px solid #f2f2f2;
        }

        .close_left {
            position: relative;
        }

        .close_left::before {
            position: absolute;
            left: -0.1rem;
            right: -0.1rem;
            top: -0.1rem;
            bottom: -0.1rem;
            content: '';
        }

        .icon-fanhui {
            color: #dbb25f;
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <header id="header">
        <div class="index_header">
            <div class="close_left" @click="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
            <div>{{name}}</div>
            <div></div>
        </div>
    </header>
</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: {
            headerH: '',
            name: '',
            url: '',
        },
        created: function () {
            apiready = function () {
                app.name = api.pageParam.name;
                app.url = api.pageParam.url;
                // alert(app.url);
                $api.fixStatusBar($api.dom('header'));
                api.setStatusBarStyle({
                    style: 'dark'
                });
                app.headerH = $api.offset($api.dom('header')).h;
                app.openInsurance()
            }
        },
        methods: {
            openInsurance: function () {
                if (app.url == '' || app.url == null || app.url == undefined) {
                    api.alert({
                        title: '暂无相关商品',
                        msg: '点击确定返回商品列表',
                    }, function (ret, err) {
                        if (ret) {
                            closeWindow()
                        }
                    });
                }
                else {
                    api.openFrame({
                        name: 'Insurance',
                        url: app.url,
                        rect: {
                            x: 0,
                            y: app.headerH,
                            w: api.frameWidth,
                            h: api.frameHeight - app.headerH
                        },
                    });
                }
            }
        }
    })
</script>