|
@@ -7,12 +7,16 @@
|
|
|
<swiper-slide v-for="(item, index) in banners" :key="index">
|
|
<swiper-slide v-for="(item, index) in banners" :key="index">
|
|
|
<!-- <img :src="item" /> -->
|
|
<!-- <img :src="item" /> -->
|
|
|
|
|
|
|
|
|
|
+ <!-- <div class="video-box" v-if="isVideo(item)">
|
|
|
|
|
+ <van-icon color="#fff" size="60" name="play-circle" />
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+
|
|
|
<video
|
|
<video
|
|
|
class="swiper-video"
|
|
class="swiper-video"
|
|
|
v-if="isVideo(item)"
|
|
v-if="isVideo(item)"
|
|
|
:src="item.url"
|
|
:src="item.url"
|
|
|
|
|
+ controls
|
|
|
:poster="getImg(changeImgs([item]), '', 1200)"
|
|
:poster="getImg(changeImgs([item]), '', 1200)"
|
|
|
- controls="controls"
|
|
|
|
|
>
|
|
>
|
|
|
您的浏览器不支持 video 标签。
|
|
您的浏览器不支持 video 标签。
|
|
|
</video>
|
|
</video>
|
|
@@ -147,6 +151,7 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
|
+ position: relative;
|
|
|
/deep/ .van-image {
|
|
/deep/ .van-image {
|
|
|
border: 2px solid #2f2f2f;
|
|
border: 2px solid #2f2f2f;
|
|
|
border-radius: @radius;
|
|
border-radius: @radius;
|
|
@@ -186,4 +191,19 @@ export default {
|
|
|
margin-left: 30px;
|
|
margin-left: 30px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.video-box {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ background-color: rgba(255, 255, 255, 0.5);
|
|
|
|
|
+ .flex();
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+
|
|
|
|
|
+ .van-icon {
|
|
|
|
|
+ color: rgba(0, 0, 0, 0.5) !important;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|