|
|
@ -4,7 +4,10 @@ |
|
|
|
:style="{height: height}" |
|
|
|
@scrolltolower="loadMoreData"> |
|
|
|
<view class="videoList"> |
|
|
|
<view class="video-item" v-for="(item, index) in spotListWord" :key="index" |
|
|
|
<view class="video-item" |
|
|
|
v-for="(item, index) in spotListWord" |
|
|
|
v-if="index < queryParams.pageSize" |
|
|
|
:key="index" |
|
|
|
> |
|
|
|
<view class="image" @click="showVideo(item, index)"> |
|
|
|
<image :src="item.spotImage && item.spotImage.split(',')[0]" mode="aspectFill"> |
|
|
@ -17,6 +20,12 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="loadMoreData" |
|
|
|
v-if="queryParams.pageSize <= spotListWord.length" |
|
|
|
@click="loadMoreData"> |
|
|
|
了解更多 |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -34,7 +43,7 @@ |
|
|
|
return { |
|
|
|
queryParams: { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 4, |
|
|
|
}, |
|
|
|
total : 0, |
|
|
|
list : [], |
|
|
@ -83,15 +92,15 @@ |
|
|
|
this.queryParams.token = uni.getStorageSync('token') |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('queryVedioById', this.queryParams, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.list = res.result |
|
|
|
// this.total = res.result.total |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.$api('queryVedioById', this.queryParams, res => { |
|
|
|
// if(res.code == 200){ |
|
|
|
// this.list = res.result |
|
|
|
// // this.total = res.result.total |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
loadMoreData(){ |
|
|
|
if(this.queryParams.pageSize <= this.list.length){ |
|
|
|
if(this.queryParams.pageSize <= this.spotListWord.length){ |
|
|
|
this.queryParams.pageSize += 10 |
|
|
|
this.queryVideoList() |
|
|
|
} |
|
|
@ -122,7 +131,7 @@ |
|
|
|
position: relative; |
|
|
|
width: calc(50% - 20rpx); |
|
|
|
margin-left: 20rpx; |
|
|
|
margin-top: 20rpx; |
|
|
|
margin-top: 10rpx; |
|
|
|
.image { |
|
|
|
position: relative; |
|
|
|
width: 100%; |
|
|
@ -130,7 +139,7 @@ |
|
|
|
|
|
|
|
image { |
|
|
|
width: 100%; |
|
|
|
height: 220rpx; |
|
|
|
height: 210rpx; |
|
|
|
border-radius: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
@ -149,12 +158,11 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.bottom { |
|
|
|
font-size: 30rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
width: calc(100% - 40rpx); |
|
|
|
padding: 30rpx; |
|
|
|
padding-top: 10rpx; |
|
|
|
padding: 15rpx; |
|
|
|
font-weight: 900; |
|
|
|
align-items: center; |
|
|
|
|
|
|
@ -191,4 +199,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.loadMoreData{ |
|
|
|
color: $uni-color; |
|
|
|
text-align: center; |
|
|
|
padding: 10rpx 0 40rpx 0; |
|
|
|
} |
|
|
|
</style> |