8***@qq.com
8***@qq.com
  • 发布:2019-12-13 19:59
  • 更新:2019-12-14 17:42
  • 阅读:682

#插件讨论# 【 仿抖音视频滑动效果 - 春雷Le 】swpier如何判断视频需要加载更多呢?

分类:uni-app

swpier如何判断视频需要加载更多呢?就类似
onReachBottom() {
console.log("上拉加载");
},

2019-12-13 19:59 负责人:无 分享
已邀请:
晓寒1987

晓寒1987 - 相濡以沫不如相忘于江湖

这个没有加载更多的概念,提供1个思路,比如你首次加载5个,可以判断滑动到第一个或者最后一个的时候触发获取更多数据(和滑动同步进行),我是这么实现的,但是赋值的时候可能有点麻烦

春雷Le

春雷Le - 私信,接各种特效

async changeCurrent(e){  
				this.index = e.detail.current;  
				for (let item of this.videoList) {  
					item.flag = false  
				}  
				this.videoList[this.index].flag = !this.videoList[this.index].flag  
				let playCount = 2  
				if(this.videoList.length - this.index - 1 <= playCount){  
					await this.pushVideoList()  
				}  
			},

不建议更多数据

该问题目前已经被锁定, 无法添加新回复