my_fri.html 6.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">
    <title>Document</title>
    <script src="../../assets/js/fontsize.js"></script>
    <link rel="stylesheet" href="../../assets/css/api.css"/>
    <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        body, html {
            background-color: #efefef;
            height: 100%;
        }

        .fir_body {
            background: url("../../assets/image/fri_bgc.jpg") no-repeat;
            background-size: cover;
            height: 100%;
            width: 100%;
            position: fixed;
            left: 0;
            top: 0;
            font-size: 20px;
        }

        .swiper-container {
            margin-top: 1rem;
        }

        .swiper-slide {
            -webkit-transition: transform 1.0s;
            -moz-transition: transform 1.0s;
            -ms-transition: transform 1.0s;
            -o-transition: transform 1.0s;
            -webkit-transform: scale(0.7);
            transform: scale(0.7);
            width: 100%;
        }

        .swiper-slide-active, .swiper-slide-duplicate-active {
            -webkit-transform: scale(1);
            transform: scale(1);
        }

        .swiper_item_fir {
            width: 66%;
            margin: 0 auto;
            overflow: hidden;
            border-radius: 0.16rem;
        }

        .swiper_item_fir_num {
            padding: 0.53rem 0.7rem;
            font-size: 20px;
            color: #424242;
        }

        .swiper_item_fir_num span {
            font-weight: bold;
            font-size: 26px;
        }

        .swiper_item_fir_name {
            margin: 1.5rem 0 0 0;
            padding: 0 0.4rem 0 0;
            text-align: right;
            font-size: 18px;
            color: #424242;
        }

        .swiper_item_fir_time {
            padding: 0.25rem 0.42rem 0.25rem 0;
            text-align: right;
            font-size: 18px;
            color: #424242;
        }

        .swiper_item_fir_report_box {
            background-color: #fff;
            padding: 0.65rem 0;
            text-align: center;
        }

        .swiper_item_fir_report {
            padding: 0.2rem 0;
            font-size: 18px;
            color: #424242;
        }

        .swiper_item_fir_report .iconfont {
            font-size: 18px;
        }

        .look_move {
            text-align: center;
            margin: 1.5rem 0 0 0;
            color: #424242;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
    <!--<div v-if="familyRecord_data.length==0" class="nodata">暂无亲友信息哦</div>-->
    <div class="fir_body">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="(item,index) in familyRecord_data"
                     @click="openFri(item.rid)">
                    <div class="swiper_item_fir" style="background-image: url('../../assets/image/two.png')">
                        <div class="swiper_item_fir_num"><span>{{index+1}}</span>/{{familyRecord_data.length}}</div>
                        <div class="swiper_item_fir_name">{{item.name}}的健康档案</div>
                        <div class="swiper_item_fir_time">最后更新时间:{{item.time}}</div>
                        <div class="swiper_item_fir_report_box">
                            <div class="swiper_item_fir_report"><span class="iconfont icon-baogao1"></span>服务报告({{item.checkout}}份)
                            </div>
                            <div class="swiper_item_fir_report"><span class="iconfont icon-wenjian"></span>检验报告({{item.service}}份)
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="look_move"><< 左右滑动浏览 >></div>
    </div>
    <!--<div v-else class="nodata">暂无亲友信息哦</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/swiper-3.4.2.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: {
            fir_swiper: {},
            familyRecord_data: []
        },
        created: function () {
            this.familyRecord();

        },
        methods: {
            // 获取亲友信息档案
            familyRecord: function () {
                var header = {
                    "XX-Device-Type": getDevice(),
                    'XX-Token': getToken(),
                };
                getRequest('post', 'user/index/familyRecord', null, header).then(function (res) {
                    // alert(JSON.stringify(res));
                    if (res.data.code == 1) {
                        app.familyRecord_data = res.data.data.info;
                    } else {
                        toastMsg(res.data.msg)
                    }
                    loadEnd();
                })
            },
            // 跳转详情页面
            openFri: function (rid) {
                openWin({
                    name: 'my_health',
                    url: './my_health.html',
                    pageParam: {
                        rid: rid,
                        type:0
                    }
                });
            }
        },
        mounted(){
            var mySwiper = new Swiper('.swiper-container', {
                speed: 1000,
                observer: true,
                observeParents: true,
                effect: 'coverflow',
                slidesPerView: 1,
                coverflow: {
                    rotate: 0,
                    depth: 60,
                    modifier: 2,
                    stretch: 20,
                    slideShadows: false
                },
                pagination: {
                    el: '.swiper-pagination',
                    clickable: true
                }
            });
        }
    })
</script>