life.html 5.4 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/icon/iconfont.css">
    <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
    <style>
        body, html {
            background-color: transparent !important;
            height: 100%;
        }

        .meal {
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .meal_cli {
            margin: 0.5rem 0.88rem;
            font-size: 15px;
            text-align: center;
            padding: 0.25rem;
            border-radius: 0.1rem;
        }

        .exit_box {
            width: 33%;
            /*margin: 2rem auto;*/
            margin: 1.5rem auto;
            text-align: center;
            padding: 0.2rem 0;
            border: 1px solid #A2A7A7;
            border-radius: 0.4rem;
            font-size: 0.26rem;
            color: #B2B9B9;
        }

        .swiper-pagination {
            width: 100%;
            position: relative;
            height: 0;
            margin: -0.5rem 0 0 0;
        }

        .swiper-pagination-bullet-active {
            transform: scale(2);
            border-radius: 50%;
            transition: all 0.6s ease 0s;
            background-color: #949494 !important;
        }

        .meal .swiper-pagination-bullets .swiper-pagination-bullet {
            margin: 0 0.2rem;
            background-color: #949494;
        }

        .swiper-pagination-bullet {
            width: 0.08rem;
            height: 0.08rem;
            display: inline-block;
            border-radius: 50%;
            background: #000;
        }

        .swiper_vip_item {
            background-color: #FFF;
            border-radius: 0.16rem;
            overflow: hidden;
            width: 80%;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        .swiper_vip_item img {
            /*width: 100%;*/
            width: 6.15rem;
            height: 8.71rem;
        }

        .swiper-container {
            margin: 1rem 0 0 0;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="meal">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="(item,index) in img">
                    <div class="swiper_vip_item">
                        <img :src="item" alt="">
                    </div>
                </div>
                <!--<div class="swiper-slide">-->
                <!--<div class="swiper_vip_item">-->
                <!--<img src="../../assets/image/nurse.png" alt="">-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="swiper-slide">-->
                <!--<div class="swiper_vip_item">-->
                <!--<img src="../../assets/image/price.png" alt="">-->
                <!--</div>-->
                <!--</div>-->
            </div>
        </div>
        <div class="swiper-pagination"></div>
        <div class="exit_box" @click="close">退出</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/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            id: '',
            mySwiper: {},
            img: []
        },
        created: function () {
            apiready = function () {
                app.id = api.pageParam.id;
                app.img = api.pageParam.img;
//                alert(JSON.stringify(app.img))
                app.int_swiper();
            }
        },
        methods: {
            close: function () {
                api.closeFrame();
            },
            int_swiper: function () {
                app.mySwiper = new Swiper('.swiper-container', {
                    initialSlide: 0,
                    observer: true,
                    observeParents: true,
                    effect: 'coverflow',
                    centeredSlides: true,
                    slidesPerView: 1,
                    coverflowEffect: {
                        rotate: 0,
                        depth: 60,
                        modifier: 2,
                        stretch: 20,
                        slideShadows: false
                    },
                    pagination: '.swiper-pagination',
                    paginationClickable: true,
                });
            }
        }
    })
</script>