disease_f.html 6.0 KB
 <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/css/common_header.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        body {
            /*background-color: #efefef;*/
        }

        .swiper_list {
            box-shadow: 5px 5px 0 #E7E7E7;
            margin-top: 0.25rem;
        }

        .swiper_item {
            padding: 0 0.25rem;
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
    <!--<header id="header">-->
        <!--<div class="index_header white_bg">-->
            <!--<div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>-->
            <!--<div class="win_mid">{{winTitle}}</div>-->
            <!--<div></div>-->
        <!--</div>-->
    <!--</header> -->
    <div class="warp">
        <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
            <!--<div class="nurse_text">{{name}}</div>-->
        </div>
        <div class="nurse_title" v-if="cid==3">
            <span class="pro">中医</span>
            <span class="prod">服务</span>
            <span> | 未病先防及既病防变,提高健康水平</span>
        </div>
        <div class="nurse_title" v-else-if="cid==6">
            <span class="pro">母婴</span>
            <span class="prod">服务</span>
            <span> | 专业服务,度过美好而难忘的日子</span>
        </div>
        <div class="nurse_title" v-else>
            <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.good_id)" v-for="(item,index) in  goods">
                <div class="swiper_item_img"><img :src="item.img" 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?item.real_price:0}}</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.goods_id)" 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>
    
</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: [],
            winTitle:''
        },
        created: function () {
            this.cid = localStorage.getItem('cid');
            this.cityname = localStorage.getItem('cityName');
            this.winTitle = localStorage.getItem('winTitle');
            document.getElementsByTagName("title")[0].innerText = this.winTitle;
            this.getCatInfo2();
        },
        methods: {
            openDoc: function (id) {
                console.log(id)
                openWin({
                    name: 'care_w',
                    url: 'care_f.html',
                    pageParam: {
                        id: id,
                        cid: this.cid,
                        cityname: this.cityname
                    }
                })
            },
            getCatInfo2: function () {
                var post = {
                    cid: this.cid
                };
                var header = {
                    "XX-Device-Type": getDevice(),
                    'XX-Token': getToken()
                };
                getRequest('post', 'portal/Goods/getCatInfo2', post, 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.goods = res.data.data.goods;
                        loadEnd();
                    } else {
                        toastMsg(res.data.msg)
                    }
                })
            }
        }
    })
</script>