[新增]增加了直播列表

This commit is contained in:
唐明明
2020-12-30 11:50:55 +08:00
parent 49a7bade36
commit aa90f73d69
9 changed files with 96 additions and 24 deletions

View File

@@ -43,9 +43,6 @@ Component({
methods: {
// 视频滚动了
changeVideo(e){
console.log(e)
let videoLists = this.data.videoList,
current = e.detail.current,
currentId = this.data.playId,

View File

@@ -2,6 +2,7 @@
<swiper class="videoSwiper" vertical bindchange="changeVideo">
<swiper-item class="videoSwiperItem" wx:for="{{videoList}}" wx:key="videoItem" circular="{{videoList.length > 2}}">
<video
class="videoSwiperItemVideo"
id="video{{item.video_id}}"
src="{{item.path_url || ''}}"
controls="{{controls}}"
@@ -12,8 +13,9 @@
bindplay="vipdeBindPlay"
bindpause="vipdeBindPlay"
loop
wx:if="{{item.video_id == playId}}"
>
</video>
<image src=""></image>
<image class="videoCover" src="{{item.cover}}" mode="aspectFill"></image>
</swiper-item>
</swiper>

View File

@@ -15,7 +15,8 @@
-webkit-overflow-scrolling:touch;
}
.videoSwiperItem video{
.videoSwiperItemVideo,
.videoCover{
width: 100%;
height: 100%;
}