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;
/deep/.carousel-indicators { position: relative;
display: block;
position: absolute; .banner-bg {
text-align: right; cursor: pointer;
margin-right: 13px; img {
margin-bottom: 13px; width: 100%;
button { }
width: 6px; .carousel-title{
height: 6px; // position: absolute;
border-radius: 50%; // bottom: 20px;
text-align: center;
margin-top: -30px;
color: #fff;
font-size: 12px;
}
}
} }
.active {
// width: 4px; .slick-arrow {
// height: 4px!important; // margin: 0 10px;
// background: #F05587; z-index: 10;
border: 0; &.slick-prev {
background: #f05587; top: 200px;
left: 25px;
}
&.slick-next {
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{ // /deep/.carousel-caption{
width: 636px; // width: 636px;
margin: 0 auto; // margin: 0 auto;
text-align: center; // text-align: center;
} // }
.carousel-item{ // .carousel-item{
cursor: pointer; // 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