审查视图

html/index/disease_f.html 5.9 KB
朱振飞 authored
1
 <head>
dl authored
2 3 4 5 6 7 8 9 10
    <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">
朱振飞 authored
11
    <link rel="stylesheet" href="../../assets/css/common_header.css">
dl authored
12 13 14 15 16 17 18 19 20 21 22 23
    <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 {
dl authored
24
            padding: 0 0.25rem;
dl authored
25 26 27 28 29 30
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
朱振飞 authored
31 32 33 34 35 36 37
    <!--<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> -->
朱振飞 authored
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    <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>
dl authored
69
                    </div>
朱振飞 authored
70
                    <div class="swiper_item_money">¥{{item.real_price?item.real_price:0}}</div>
dl authored
71 72 73
                </div>
            </div>
        </div>
朱振飞 authored
74 75 76 77 78 79 80 81
        <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>
dl authored
82 83 84
            </div>
        </div>
    </div>
朱振飞 authored
85
    
dl authored
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
</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: [],
朱振飞 authored
107
            winTitle:''
dl authored
108 109
        },
        created: function () {
朱振飞 authored
110 111 112
            this.cid = localStorage.getItem('cid');
            this.cityname = localStorage.getItem('cityName');
            this.winTitle = localStorage.getItem('winTitle');
朱振飞 authored
113
            document.title = this.winTitle;
朱振飞 authored
114
            this.getCatInfo2();
dl authored
115 116 117
        },
        methods: {
            openDoc: function (id) {
朱振飞 authored
118 119
                console.log(id)
                openWin({
dl authored
120
                    name: 'care_w',
朱振飞 authored
121
                    url: 'care_f.html',
dl authored
122 123
                    pageParam: {
                        id: id,
朱振飞 authored
124 125
                        cid: this.cid,
                        cityname: this.cityname
dl authored
126 127 128 129 130
                    }
                })
            },
            getCatInfo2: function () {
                var post = {
朱振飞 authored
131
                    cid: this.cid
dl authored
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
                };
                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>