Commit a95172b2 by 方圆

零售轮播图兼容

parent e86d86cc
...@@ -77,13 +77,35 @@ ...@@ -77,13 +77,35 @@
/> />
</div> </div>
</div> </div>
<div class="col-lg-6 lunbo"> <div class="col-lg-6 lunbo retail_lunbo">
<div class="lunbo-cnt"> <div class="lunbo-cnt">
<p class="lunbo-title"> <p class="lunbo-title">
<span>图片集</span> <span>图片集</span>
<span class="more" @click="lookMore('图片集')">更多>></span> <span class="more" @click="lookMore('图片集')">更多>></span>
</p> </p>
<div <div class="banner">
<VueSlickCarousel v-bind="bannerSettings" v-if="pictureList.length > 0">
<div v-for="(item, index) in pictureList" :key="'pictureList' + index">
<div class="banner-item">
<div class="banner-bg" @click="lookPictureDetail(item)">
<img :src="item.picFile" alt="" />
<div class="carousel-title">{{item.title}}</div>
</div>
</div>
</div>
<template #prevArrow>
<div class="custom-arrow"></div>
</template>
<template #customPaging>
<div class="custom-dot"></div>
</template>
<template #nextArrow>
<div class="custom-arrow"></div>
</template>
</VueSlickCarousel>
</div>
<!-- <div
id="carouselExampleCaptions" id="carouselExampleCaptions"
class="carousel slide" class="carousel slide"
data-bs-ride="carousel" data-bs-ride="carousel"
...@@ -147,7 +169,7 @@ ...@@ -147,7 +169,7 @@
aria-hidden="true" aria-hidden="true"
></span> ></span>
</button> </button>
</div> </div> -->
</div> </div>
</div> </div>
<div class="div5"> <div class="div5">
...@@ -181,10 +203,14 @@ ...@@ -181,10 +203,14 @@
</div> </div>
</template> </template>
<script> <script>
import VueSlickCarousel from "vue-slick-carousel";
import "vue-slick-carousel/dist/vue-slick-carousel.css";
import "vue-slick-carousel/dist/vue-slick-carousel-theme.css";
import breadcrumb from "../comps/breadcrumb.vue"; import breadcrumb from "../comps/breadcrumb.vue";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
export default { export default {
components: { components: {
VueSlickCarousel,
breadcrumb, breadcrumb,
}, },
data() { data() {
...@@ -253,6 +279,16 @@ export default { ...@@ -253,6 +279,16 @@ export default {
qrCodeList: [], qrCodeList: [],
qrCodeImg: '', qrCodeImg: '',
pictureList: [], pictureList: [],
bannerSettings: {
arrows: true,
autoplay: true,
autoplaySpeed: 4000,
dots: true,
centerMode: true,
centerPadding: "0% 0% 0%",
slidesToShow: 1,
slidesToScroll: 1,
},
}; };
}, },
mounted() { mounted() {
...@@ -384,6 +420,38 @@ export default { ...@@ -384,6 +420,38 @@ export default {
} }
} }
</style> </style>
<style lang="scss">
.retail_lunbo{
.slick-dots {
position: absolute;
bottom: 40px !important;
display: flex;
align-items: center;
justify-content: center;
height: 20px;
line-height: 20px;
li {
width: 10px;
height: 10px;
&.slick-active {
.custom-dot {
background: #ffffff;
opacity: 1;
}
}
.custom-dot {
border-radius: 50%;
width: 100%;
height: 100%;
background: #fff;
line-height: 1;
padding: 0;
opacity: 0.5;
}
}
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.composite { .composite {
margin-bottom: 30px; margin-bottom: 30px;
...@@ -562,41 +630,81 @@ export default { ...@@ -562,41 +630,81 @@ export default {
font-size: 14px; font-size: 14px;
} }
} }
.carousel-control-prev-icon,
.carousel-control-next-icon { .banner {
border-radius: 50%; height: 420px;
background-color: #000000; .banner-item {
background-size: 60% 60%; width: 100%;
height: 420px;
position: relative;
.banner-bg {
cursor: pointer;
img {
width: 100%;
} }
/deep/.carousel-indicators { .carousel-title{
display: block; // position: absolute;
position: absolute; // bottom: 20px;
text-align: right; text-align: center;
margin-right: 13px; margin-top: -30px;
margin-bottom: 13px; color: #fff;
button { font-size: 12px;
width: 6px;
height: 6px;
border-radius: 50%;
} }
.active {
// width: 4px;
// height: 4px!important;
// background: #F05587;
border: 0;
background: #f05587;
} }
} }
/deep/.carousel-caption{ .slick-arrow {
width: 636px; // margin: 0 10px;
margin: 0 auto; z-index: 10;
text-align: center; &.slick-prev {
top: 200px;
left: 25px;
} }
.carousel-item{ &.slick-next {
cursor: pointer; top: 200px;
right: 25px;
}
} }
}
// .carousel-control-prev-icon,
// .carousel-control-next-icon {
// border-radius: 50%;
// background-color: #000000;
// background-size: 60% 60%;
// }
// /deep/.carousel-indicators {
// display: block;
// position: absolute;
// text-align: right;
// margin-right: 13px;
// margin-bottom: 13px;
// button {
// width: 6px;
// height: 6px;
// border-radius: 50%;
// }
// .active {
// // width: 4px;
// // height: 4px!important;
// // background: #F05587;
// border: 0;
// background: #f05587;
// }
// }
// /deep/.carousel-caption{
// width: 636px;
// margin: 0 auto;
// text-align: center;
// }
// .carousel-item{
// cursor: pointer;
// }
.lunbo-bottom { .lunbo-bottom {
width: 100%; width: 100%;
height: 10%; height: 10%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment