landjj321
2021-03-25 f8739790fbbc361de2fd7ea9a5d31dd79a89f43d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<template>
    <div class="art-mien">
        <div class="bg">
            <span class="title font-bold">文艺·风采</span>
        </div>
        <div id="certify">
            <!-- <el-carousel type="card" indicator-position="none" loop="true" interval="2000" height="360px" :autoplay="true">
                <el-carousel-item v-for="(item, index) in list" :key="index">
                    
                        <img :src="item.imgSrc" />
                </el-carousel-item>
            </el-carousel> -->
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide" v-for="(item,index) in list" :key="index">
                        <img :src="item" />
                    </div>
                </div>
                <div class="swiper-pagination"></div>
                <!-- <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div> -->
            </div>
        </div>
    </div>
</template>
 
<script>
    // import '../../../utils/swiper.min.js';
    import Swiper from  'swiper/swiper-bundle.js'
    import 'swiper/swiper-bundle.css'
 
    export default {
        name: "ArtMien",
        data() {
            return {
                list: [
                    require("@/assets/home/art_mien/1.png"),
                    require("@/assets/home/art_mien/2.png"),
                    require("@/assets/home/art_mien/3.png"),
                    require("@/assets/home/art_mien/4.png"),
                    require("@/assets/home/art_mien/5.png"),
                    require("@/assets/home/art_mien/6.png"),
                    require("@/assets/home/art_mien/7.png"),
                    require("@/assets/home/art_mien/8.png")
                ]
            }
        },
        mounted() {
 
            new Swiper('#certify .swiper-container', {
                autoplay: {
                  delay: 1000
                },
                loop: true,
                effect: 'coverflow',
                grabCursor: true,
                centeredSlides: true,
                slidesPerView: 'auto',
                coverflowEffect: {
                  rotate: 80,
                  stretch: 0,
                  depth: 200,
                  modifier: 1,
                  slideShadows: true
                },
                pagination: {
                  el: '.swiper-pagination'
                }
            });
        }
 
    }
</script>
 
 
<style lang="scss" scoped>
    @import "~@/styles/variables.scss";
    // @import "../../../styles/swiper.min.css";
 
    .art-mien {
        width: $appWidth;
        padding: 20px;
        // height: 36rem;
 
        .bg {
            height: 8rem;
            overflow: hidden;
            position: relative;
            background-image: url("../../../assets/home/art_mien/bg.png");
            background-size: cover;
            text-align: center;
            line-height: 8rem;
 
            .title {
                // 文件渐变 TODO
                background: linear-gradient(to bottom, #ffffff, #949494);
                font-size: 60px;
                letter-spacing: 4.2rem;
                margin-left: 3.1rem; // 加上使文字居中
                background-clip: text;
                -webkit-background-clip: text;
                color: #fff;
                // color: transparent;
                text-shadow: 0.3rem 0.2rem 0.2rem #4a1308;
            }
        }
 
        #certify {
            margin-top: 1rem;
            position: relative;
            margin: 0 auto;
            .swiper-container {
                padding: 30px;
            }
 
            .swiper-slide {
                width: 350px;
                height: 430px;
            }
 
            .swiper-slide img {
                display: block;
                width: 100%;
                height: 100%;
            }
 
            .swiper-slide p {
                line-height: 98px;
                padding-top: 0;
                text-align: center;
                color: #636363;
                font-size: 1.1em;
                margin: 0;
            }
 
            .swiper-pagination {
                width: 100%;
                bottom: 0px;
            }
 
            .swiper-pagination-bullets .swiper-pagination-bullet {
                margin: 0 5px;
                border: 3px solid #fff;
                background-color: #d5d5d5;
                width: 10px;
                height: 10px;
                opacity: 1;
            }
 
            .swiper-pagination-bullets .swiper-pagination-bullet-active {
                border: 3px solid #00aadc;
                background-color: #fff;
            }
 
            .swiper-button-prev {
                left: -30px;
                width: 45px;
                height: 45px;
                background: url(../../../assets/home/art_mien/wm_button_icon.png) no-repeat;
                background-position: 0 0;
                background-size: 100%;
            }
 
            .swiper-button-prev:hover {
                background-position: 0 -46px;
                background-size: 100%
            }
 
            .swiper-button-next {
                right: -30px;
                width: 45px;
                height: 45px;
                background: url(../../../assets/home/art_mien/wm_button_icon.png) no-repeat;
                background-position: 0 -93px;
                background-size: 100%;
            }
 
            .swiper-button-next:hover {
                background-position: 0 -139px;
                background-size: 100%
            }
        }
    }
</style>