This commit is contained in:
2024-05-17 18:02:49 +08:00
parent 8407d51fb6
commit b5264dc222
4056 changed files with 308094 additions and 41932 deletions

View File

@@ -0,0 +1,77 @@
<template>
<view class="video-list">
<list
class="list"
show-scrollbar="false">
<cell
class="cell"
:key="item.videoId"
v-for="item in lists">
<view
class="video-item"
@click="handleClick(item)">
<image class="video-cover" :src="item.videoCover" mode="aspectFill"></image>
<view class="right-view">
<text
class="video-title"
:class="{active : item.definition ? item.videoId === currentVideo && item.quality == currentDefinition : item.videoId === currentVideo}"
>{{ item.videoTitle }}</text>
<!-- <text class="video-time">{{ item.videoTime }}</text> -->
</view>
</view>
</cell>
</list>
</view>
</template>
<script>
export default {
name:"VideoList",
data() {
return {};
},
props: {
lists: {
type: Array,
default: []
},
currentVideo: {
type: String,
default: ''
},
currentDefinition: {
type: Number,
default: 20
}
},
methods: {
handleClick(item) {
this.$emit('listClick', item);
}
}
}
</script>
<style lang="stylus" scoped>
.video-list
flex 1
.list
flex 1
padding 0 20rpx
.video-item
flex-direction row
margin 15rpx 0
.right-view
margin-left 20rpx
flex 1
.video-cover
width 160rpx
height 90rpx
border-radius 2rpx
.video-title
font-size 26rpx
line-height 39rpx
color #FFF
&.active
color #FF920A
</style>

View File

@@ -0,0 +1,118 @@
<template>
<view class="video-list">
<slot name="title"></slot>
<list
class="list"
show-scrollbar="false">
<cell
class="cell"
:key="item.videoId"
v-for="item in lists">
<view
class="video-item"
@click="handleClick(item)">
<template
v-if="pickMode"
>
<image
v-if="!item.selected"
class="radio-icon"
src="@/static/download/unselected@2x.png"></image>
<image
v-else
class="radio-icon"
src="@/static/download/selected@2x.png"></image>
</template>
<image class="video-cover" :src="item.videoCover" mode="aspectFill"></image>
<view class="right-view">
<text
class="video-title"
:class="{active : item.videoId === currentVideo}"
>{{ item.videoTitle }}</text>
<text class="video-time">{{ item.videoTime }}</text>
</view>
</view>
</cell>
</list>
<slot name="footer"></slot>
</view>
</template>
<script>
import { mapMutations } from 'vuex'
export default {
name:"VideoList",
data() {
return {};
},
props: {
lists: {
type: Array,
default: []
},
currentVideo: {
type: String,
default: ''
},
isPushing: {
type: Boolean,
default: false
},
pickMode: {
type: Boolean
}
},
methods: {
...mapMutations(['makeDownloadList']),
handleClick(item) {
if (this.pickMode) {
this.$set(item, 'selected', !item.selected);
return;
}
if (this.isPushing) {
uni.showToast({
title: '投屏中,暂不支持切换',
icon: 'none'
})
return;
}
this.$emit('listClick', item);
},
}
}
</script>
<style lang="stylus" scoped>
.video-list
flex 1
padding 0 30rpx
background-color: #FFF;
.list
flex 1
.video-item
flex-direction row
align-items: center
margin 15rpx 0
.right-view
margin-left 20rpx
flex 1
.radio-icon
margin-right: 20rpx
width: 30rpx
height: 30rpx
.video-cover
width 320rpx
height 180rpx
border-radius 10rpx
.video-title
font-size 28rpx
line-height 42rpx
color #333
&.active
color #FF920A
.video-time
margin-top 30rpx
font-size 26rpx
color #666
</style>

View File

@@ -0,0 +1,63 @@
<template>
<view class="video-list">
<waterfall
class="waterfall"
column-count="2"
column-gap="10"
left-gap="10"
right-gap="10"
>
<cell
class="cell"
:key="item.videoId"
v-for="item in lists">
<navigator
class="video-item"
hover-class="navigator-hover"
:url="`/pages/detail/detail?videoId=${item.videoId}&userId=${item.userId}`">
<image class="video-cover" :src="item.videoCover"></image>
<text class="video-title">{{ item.videoTitle }}</text>
</navigator>
</cell>
</waterfall>
</view>
</template>
<script>
export default {
name:"VideoList",
data() {
return {
};
},
props: {
lists: {
type: Array,
default: []
},
column: {
type: Number,
default: 1
}
}
}
</script>
<style lang="stylus" scoped>
.video-list
flex 1
.waterfall
flex 1
.video-cover
width 350rpx
height 196rpx
border-radius 10rpx
.video-title
margin 20rpx 0
font-size 28rpx
color #333333
text-overflow ellipsis
lines 1
</style>