小程序
小游戏
企业微信
微信支付
扫描小程序码分享
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
下拉分页?没懂。我做的是类似抖音一样的无限下滑。
有一点要注意,你视频多放一些,10个10个的加,我的就是。最开始几个几个的放实现不了,后来10个10个的就可以了
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<mp-video-swiper bindtap="pausevideo" class="video-swiper" video-list="{{videoList}}" bindchange="bindchange" bindplay="onPlay" bindpause="onPause" bindtimeupdate="onTimeUpdate" bindended="onEnded" binderror="onError" bindwaiting="onWaiting" bindprogress="onProgress" bindloadedmetadata="onLoadedMetaData" VideoSwiperItem=""></mp-video-swiper>
var arrid = [];
rdata.forEach(item => {
var obj = {
id: item.partakeId,
url: item.partakeUrl,
objectFit: 'contain',
};
arrs.push(obj);
arrid.push(obj.id);
})
var videoList = arrs;
if (this.data.isgetNewList) {
videoList.splice(1,0,that.data.dataList[0])
allList = videoList;
} else {
allList = allList.concat(arrs);
}
allListId = arrid;
console.log(videoList);
var lastSedId;
if(videoList.length > 5){
lastSedId = videoList[videoList.length - 5].id;
}else{
lastSedId = videoList[videoList.length - 1].id;
console.log(lastSedId);
that.setData({
videoList: videoList,
allList: allList,
allListId: allListId,
isgetNewList: false,
lastSedItemId: lastSedId,
resolve();
},
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
下拉分页?没懂。我做的是类似抖音一样的无限下滑。
有一点要注意,你视频多放一些,10个10个的加,我的就是。最开始几个几个的放实现不了,后来10个10个的就可以了
<mp-video-swiper bindtap="pausevideo" class="video-swiper" video-list="{{videoList}}" bindchange="bindchange" bindplay="onPlay" bindpause="onPause" bindtimeupdate="onTimeUpdate" bindended="onEnded" binderror="onError" bindwaiting="onWaiting" bindprogress="onProgress" bindloadedmetadata="onLoadedMetaData" VideoSwiperItem=""></mp-video-swiper>
var arrid = [];
rdata.forEach(item => {
var obj = {
id: item.partakeId,
url: item.partakeUrl,
objectFit: 'contain',
};
arrs.push(obj);
arrid.push(obj.id);
})
var videoList = arrs;
if (this.data.isgetNewList) {
videoList.splice(1,0,that.data.dataList[0])
allList = videoList;
} else {
allList = allList.concat(arrs);
}
allListId = arrid;
console.log(videoList);
var lastSedId;
if(videoList.length > 5){
lastSedId = videoList[videoList.length - 5].id;
}else{
lastSedId = videoList[videoList.length - 1].id;
}
console.log(lastSedId);
that.setData({
videoList: videoList,
allList: allList,
allListId: allListId,
isgetNewList: false,
lastSedItemId: lastSedId,
})
resolve();
}
})
})
},