Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
5d7865eb
Commit
5d7865eb
authored
Jul 13, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"fix: 问题修复
1、视频切换闪一下;2、swiper不从第一个开始;3、circular改变导致swiper刷 新问题预解决"
parent
1140bf69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
.eslintcache
.eslintcache
+1
-1
video.wpy
src/components/custom/video.wpy
+24
-21
No files found.
.eslintcache
View file @
5d7865eb
{"D:\\project\\mini-program-wepy\\src\\app.wpy":{"size":1554,"mtime":1594112587014,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\app.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\api.js":{"size":1949,"mtime":1594112587014,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\api.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\eventHub.js":{"size":90,"mtime":1594112587015,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\eventHub.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\raffleProbability.js":{"size":1792,"mtime":1594112587015,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\raffleProbability.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\wxRequest.js":{"size":2437,"mtime":1594201063892,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\wxRequest.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\activityList.wpy":{"size":2631,"mtime":1594379850591,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\activityList.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\china.js":{"size":102261,"mtime":1594112587017,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\china.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\goloading.wpy":{"size":1103,"mtime":1594112587017,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\goloading.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\goodsList.wpy":{"size":9486,"mtime":1594112587018,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\goodsList.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\loading.wpy":{"size":1260,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\loading.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\network.wpy":{"size":1517,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\network.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\openAnimation.wpy":{"size":17653,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\openAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\popup.wpy":{"size":4977,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\popup.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\sharedPopup.wpy":{"size":8545,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\sharedPopup.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\sign.wpy":{"size":11743,"mtime":1594380552044,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\sign.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\starAnimation.wpy":{"size":4063,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\starAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\video.wpy":{"size":11837,"mtime":1594379901688,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\video.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\videoPause.wpy":{"size":941,"mtime":1594112587022,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\videoPause.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\agreement.wpy":{"size":225,"mtime":1594112587148,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\agreement.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\help.wpy":{"size":3183,"mtime":1594112587148,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\help.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\index.wpy":{"size":19387,"mtime":1594265220597,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\index.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\morehelp.wpy":{"size":269,"mtime":1594112587149,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\morehelp.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\myraffles.wpy":{"size":3271,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\myraffles.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\prize.wpy":{"size":7951,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\prize.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\raffle.wpy":{"size":13368,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\raffle.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\search.wpy":{"size":5690,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\search.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\store\\index.js":{"size":850,"mtime":1594112587151,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\store\\index.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\utils.js":{"size":1288,"mtime":1594264466804,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\utils.js","messages":[],"errorCount":0,"warningCount":0}}}
{"D:\\project\\mini-program-wepy\\src\\app.wpy":{"size":1542,"mtime":1594382420654,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\app.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\api.js":{"size":1949,"mtime":1594112587014,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\api.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\eventHub.js":{"size":90,"mtime":1594112587015,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\eventHub.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\raffleProbability.js":{"size":1792,"mtime":1594112587015,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\raffleProbability.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\wxRequest.js":{"size":2585,"mtime":1594382247699,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\wxRequest.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\activityList.wpy":{"size":2503,"mtime":1594382743183,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\activityList.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\china.js":{"size":102261,"mtime":1594112587017,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\china.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\goloading.wpy":{"size":1103,"mtime":1594112587017,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\goloading.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\goodsList.wpy":{"size":9486,"mtime":1594112587018,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\goodsList.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\loading.wpy":{"size":1260,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\loading.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\network.wpy":{"size":1517,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\network.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\openAnimation.wpy":{"size":17653,"mtime":1594112587019,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\openAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\popup.wpy":{"size":4977,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\popup.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\sharedPopup.wpy":{"size":8545,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\sharedPopup.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\sign.wpy":{"size":11743,"mtime":1594380552044,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\sign.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\starAnimation.wpy":{"size":4063,"mtime":1594112587020,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\starAnimation.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\video.wpy":{"size":12212,"mtime":1594605283700,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\video.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\components\\custom\\videoPause.wpy":{"size":941,"mtime":1594112587022,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\components\\custom\\videoPause.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\agreement.wpy":{"size":225,"mtime":1594112587148,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\agreement.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\help.wpy":{"size":3183,"mtime":1594112587148,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\help.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\index.wpy":{"size":19387,"mtime":1594382636535,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\index.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\morehelp.wpy":{"size":269,"mtime":1594112587149,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\morehelp.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\myraffles.wpy":{"size":3271,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\myraffles.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\prize.wpy":{"size":7951,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\prize.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\raffle.wpy":{"size":13368,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\raffle.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\pages\\search.wpy":{"size":5690,"mtime":1594112587150,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\pages\\search.wpy","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\store\\index.js":{"size":850,"mtime":1594112587151,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\store\\index.js","messages":[],"errorCount":0,"warningCount":0}},"D:\\project\\mini-program-wepy\\src\\common\\utils.js":{"size":1288,"mtime":1594264466804,"hashOfConfig":"p3gqur","results":{"filePath":"D:\\project\\mini-program-wepy\\src\\common\\utils.js","messages":[],"errorCount":0,"warningCount":0}}}
\ No newline at end of file
\ No newline at end of file
src/components/custom/video.wpy
View file @
5d7865eb
...
@@ -5,31 +5,31 @@
...
@@ -5,31 +5,31 @@
duration="500"
duration="500"
circular="{{circular}}"
circular="{{circular}}"
vertical
vertical
current="
1
"
current="
0
"
bindchange="moveSwiper">
bindchange="moveSwiper">
<swiper-item wx:for="{{curQueue}}" wx:key="index">
<swiper-item wx:for="{{curQueue}}" wx:key="index">
<view class="video-swiper">
<view class="video-swiper">
<video
<video
class="video-item"
class="video-item"
:class="{ show: item.showType && item.showType.value == 2 }"
id="video_{{index}}"
id="video_{{index}}"
loop
loop
enable-progress-gesture="{{false}}"
enable-progress-gesture="{{false}}"
show-center-play-btn="{{false}}"
show-center-play-btn="{{false}}"
controls="{{false}}"
controls="{{false}}"
src="{{
currentIndex == index ?item.videoUrl :nul
l}}"
src="{{
item.videoUr
l}}"
data-id="{{item.id}}"
data-id="{{item.id}}"
object-fit="contain"
object-fit="contain"
data-index="{{index}}"
data-index="{{index}}"
@tap="videoTap"
@tap="videoTap"
custom-cache="{{false}}"
custom-cache="{{false}}"
wx:if="{{item.showType && item.showType.value ==2}}"
bindplay="loadMedia"
bindplay="loadMedia"
bindloadedmetadata="loadMedia"
bindloadedmetadata="loadMedia"
>
>
<video-pause :pause="videoPause"></video-pause>
<video-pause :pause="videoPause"></video-pause>
<van-loading type="spinner" size="40" v-if="videoLoading" custom-class="video-loading"/>
<!--<video-loading v-if="videoLoading" :snapshot="item.videoSnapUrl"/>-->
</video>
</video>
<van-loading type="spinner" size="40" v-if="videoLoading" custom-class="video-loading"/>
<!-- <video-loading v-if="videoLoading" :snapshot="item.videoSnapUrl"/> -->
<van-image wx:if="{{item.showType && item.showType.value ==1}}" use-loading-slot src="{{item.photoUrl || item.videoSnapUrl}}" class="images" radius="10rpx" fit="contain" width="100%" height="100%">
<van-image wx:if="{{item.showType && item.showType.value ==1}}" use-loading-slot src="{{item.photoUrl || item.videoSnapUrl}}" class="images" radius="10rpx" fit="contain" width="100%" height="100%">
<van-loading slot="loading" type="spinner" size="20" vertical/>
<van-loading slot="loading" type="spinner" size="20" vertical/>
</van-image>
</van-image>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
prevQueue: [],
prevQueue: [],
curQueue: [],
curQueue: [],
circular: false,
circular: false,
_last: 1,
_last:
-
1,
_invalidUp: 0,
_invalidUp: 0,
_invalidDown: 0,
_invalidDown: 0,
_videoContexts: [],
_videoContexts: [],
...
@@ -214,25 +214,24 @@
...
@@ -214,25 +214,24 @@
circular = false;
circular = false;
}
}
this.curQueue = [...curQueue];
this.curQueue = [...curQueue];
this.circular = circular;
setTimeout(() => {
this.circular = circular;
}, 600);
},
},
playCurrent (current) {
playCurrent (current) {
this.$nextTick(() => {
this.$nextTick(() => {
if (playTimer) clearTimeout(500);
this.curQueue[current] && this.getProgress(this.curQueue[current].id);
playTimer = setTimeout(() => {
// 滑动到当前元素时,其他video都暂停,只播放当前video
this.curQueue[current] && this.getProgress(this.curQueue[current].id);
this._videoContexts.forEach(function (ctx, index) {
// 滑动到当前元素时,其他video都暂停,只播放当前video
if (ctx) {
this._videoContexts.forEach(function (ctx, index) {
if (index !== current) {
if (ctx) {
ctx.pause();
if (index !== current) {
} else {
ctx.pause();
ctx.play();
} else {
ctx.play();
}
}
}
}
);
}
this.updateAwardsInfo(current
);
}
);
}, 500
);
this.updateAwardsInfo(current
);
});
});
},
},
videoTap(e) {
videoTap(e) {
...
@@ -307,6 +306,10 @@
...
@@ -307,6 +306,10 @@
position: absolute;
position: absolute;
background-color: #000;
background-color: #000;
z-index: 1;
z-index: 1;
display: none;
&.show {
display: block;
}
}
}
.video-loading {
.video-loading {
position: absolute;
position: absolute;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment