Commit 2dea00d6 authored by 郭志伟's avatar 郭志伟

"style: lint"

parent c31eedea
......@@ -71,11 +71,10 @@
prevQueue: [],
curQueue: [],
circular: false,
_last: -1,
_last: 1,
_invalidUp: 0,
_invalidDown: 0,
_videoContexts: [],
currentIndex: 0,
videoPause: false,
showPopup: false,
videoLoading: true
......@@ -101,9 +100,9 @@
// 同时展示的元素只有三个,curQueue中始终只有三个元素,用来解决吧video过多时,资源加载问题
// 当前的资源加载解决方案是参考小程序的video-swiper源码
newVal.forEach(function (item, index) {
if (index === 1) {
if (index === 0) {
_this.curQueue[0] = item;
} else if (index === 0) {
} else if (index === 1) {
_this.curQueue[1] = item;
} else if (index === 2) {
_this.curQueue[2] = item;
......@@ -122,7 +121,6 @@
_this.nextQueue.push(item);
});
}
// this.compute(this.userAccount);
},
moveSwiper(e) {
this.videoPause = false;
......@@ -130,12 +128,8 @@
if (e.$wx.detail.source === 'touch') {
// 增加一个透明遮罩层,控制用户滑动速度,400ms内只能滑动一次,解决用户滑动过快,不触发animationfinish的bug
this.showPopup = true;
// debounce(() => {
// this.showPopup = false;
// }, 200)();
const current = e.$wx.detail.current;
this.currentIndex = current;
// 如果next中如果就剩下4个了,请求下一页
if (this.nextQueue.length === 4) {
getPrizeList().then(data => {
......@@ -207,7 +201,7 @@
this._videoContexts.forEach(function (ctx, index) {
if (ctx) {
const showType = that.curQueue[current] && that.curQueue[current].showType && that.curQueue[current].showType.value === 2;
if (index === current || showType) {
if (index === current && showType) {
ctx.play();
} else {
ctx.pause();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment