Insurance.html 5.3 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/css/index.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        body {
            /*background-color: #efefef;*/
        }
        .nurse_title {
            padding: 0.25rem 0.42rem;
        }
        .swiper_item{
            padding: 0.28rem 0.25rem ;
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
    <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
        <!--<div class="nurse_text">{{name}}</div>-->
    </div>
    <div class="nurse_title"><span class="pro">健康</span><span class="prod">保障</span><span>|  精选健康保险, 总有一款适合你</span>
    </div>
    <div class="swiper_list">
        <div class="swiper_item nodata" v-if="goods.length==0">暂无信息</div>
        <div class="swiper_item" v-else @click="openDoc(item.post_title,item.good_id,item.url)"
             v-for="(item,index) in  goods">
            <div class="swiper_item_img"><img :src="item.icon" alt=""></div>
            <div class="swiper_item_right">
                <div class="swiper_item_title">{{item.post_title}}</div>
                <div class="swiper_item_content">{{item.other_title}}</div>
                <div class="swiper_item_type">
                    <div class="swiper_item_type1" v-for="(j,item2_index) in item.tag">
                        <div class="icon_img"><img :src="j.url" alt=""></div>
                        <span>{{j.text}}</span>
                    </div>
                </div>
                <div class="swiper_item_money">¥{{item.real_price}}</div>
            </div>
        </div>
    </div>
    <div class="nurse_title"><span class="pro">相关</span><span
            class="prod">服务</span><span> | 更多优质服务推介</span></div>
    <div class="nurse_img_box">
        <div class="nurse_item bcg" @click="openDoc(item.post_title,item.goods_id,item.url)"
             v-for="(item,index) in related_service">
            <div class="nurse_item_img">
                <img :src="item.img" alt="">
            </div>
            <div class="nurse_item_title bold">{{item.name}}</div>
            <div><span class="nurse_item_price">{{item.price}}</span></div>
        </div>
    </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: {
            cid: '',
            banner: '',
            name: '',
            goods: [],
            related_service: [],
            introduce: []
        },
        created: function () {
            this.cid = localStorage.getItem('cid');
            this.getInsurance();

        },
        methods: {
            openDoc: function (care_name, id, url) {
                var app = this;
                if(url){
                    openWin({
                        name: 'care_w',
                        url: './insurance_detial.html',
                        pageParam: {
                            id: id,
                            cid: app.cid,
                            url: escape2Html(url),
                            name: care_name
                        }
                    })
                }else{
                    openWin({
                        name: 'care_w',
                        url: './care_f.html',
                        pageParam: {
                            id: id,
                            cid: app.cid
                        }
                    })
                }

            },
            getInsurance: function () {
                var app = this;
                var header = {
                    "XX-Device-Type": getDevice(),
                    'XX-Token': getToken()
                };
                getRequest('post', 'portal/Goods/getInsurance', null, header).then(function (res) {
                    if (res.data.code == 1) {
                        app.banner = res.data.data.img;
                        app.name = res.data.data.name;
                        app.related_service = res.data.data.related_service;
                        app.introduce = res.data.data.introduce;
                        app.goods = res.data.data.goods;
                        loadEnd();
                    } else {
                        toastMsg(res.data.msg)
                    }
                })
            }
        }
    })
</script>