|
|
@@ -4,12 +4,21 @@ |
|
|
|
<div class="swiper-containerhor">
|
|
|
|
<div class="swiper-wrapper">
|
|
|
|
<div class="swiper-slide" v-for="(item, index) in bannerArray" :key="index">
|
|
|
|
<img :src="item.img">
|
|
|
|
<div v-if="item.flag === 'image'" class="imagezb">
|
|
|
|
<img :src="item.img">
|
|
|
|
<el-button>进入直播间</el-button>
|
|
|
|
<div class="textzb">
|
|
|
|
<a class="titlezb">主播: {{ item.name }}</a>
|
|
|
|
<a class="contentzb">内容: {{ item.content }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else class="videozb">
|
|
|
|
<img :src="item.img">
|
|
|
|
<div class="textzb">
|
|
|
|
<!-- <a class="titlezb">主播: {{ item.name }}</a> -->
|
|
|
|
<a class="contentzb">{{ item.content }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="main">
|
|
|
@@ -52,7 +61,7 @@ export default { |
|
|
|
prevButton: '.swiper-button-prev',
|
|
|
|
nextButton: '.swiper-button-next',
|
|
|
|
spaceBetween: 30,
|
|
|
|
autoplay: 3000,
|
|
|
|
// autoplay: 3000,
|
|
|
|
loop: true
|
|
|
|
})
|
|
|
|
}
|
|
|
@@ -122,6 +131,52 @@ export default { |
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.videozb {
|
|
|
|
width: 230px;
|
|
|
|
float: left;
|
|
|
|
margin-right: 20px;
|
|
|
|
position: relative;
|
|
|
|
img {
|
|
|
|
width: 230px;
|
|
|
|
}
|
|
|
|
.textzb {
|
|
|
|
margin-top: 10px;
|
|
|
|
line-height: 16px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
|
|
|
a {
|
|
|
|
width: 100%;
|
|
|
|
display: inline-block;
|
|
|
|
text-align: left;
|
|
|
|
line-height: 30px;
|
|
|
|
}
|
|
|
|
.contentzb{
|
|
|
|
margin-top: 10px;
|
|
|
|
width: 207px;
|
|
|
|
font-size: 18px;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #030303;
|
|
|
|
line-height: 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.videozb::after {
|
|
|
|
content: '';
|
|
|
|
z-index: 99;
|
|
|
|
width: 55px;
|
|
|
|
height: 55px;
|
|
|
|
position: absolute;
|
|
|
|
background-image: url('../../assets/play.png');
|
|
|
|
background-size: 100%;
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -27.5px;
|
|
|
|
top: 200px;
|
|
|
|
z-index: 99;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|