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
dc243dbf
Commit
dc243dbf
authored
Jun 17, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 解决加载
parent
78d18fac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
common.wxs
src/common/common.wxs
+1
-5
prizeList.wpy
src/components/custom/prizeList.wpy
+3
-4
No files found.
src/common/common.wxs
View file @
dc243dbf
...
@@ -16,13 +16,9 @@ function getClass (status) {
...
@@ -16,13 +16,9 @@ function getClass (status) {
console.log(status)
console.log(status)
return cls[index]
return cls[index]
};
};
function showVideo(item,current,index
,loadMedia
) {
function showVideo(item,current,index) {
if(item.showType && item.showType.value ==2) {
if(item.showType && item.showType.value ==2) {
if(loadMedia.indexOf(index) !== -1) {
return true
}
if(current === index) {
if(current === index) {
loadMedia.push(index);
return true
return true
} else {
} else {
return false;
return false;
...
...
src/components/custom/prizeList.wpy
View file @
dc243dbf
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
height:100%;
height:100%;
width:100%;
width:100%;
position: absolute;
position: absolute;
background-color: #000;
z-index: 1;
z-index: 1;
}
}
...
@@ -86,7 +87,7 @@
...
@@ -86,7 +87,7 @@
show-center-play-btn="{{false}}"
show-center-play-btn="{{false}}"
enable-progress-gesture="{{false}}"
enable-progress-gesture="{{false}}"
controls="{{false}}"
controls="{{false}}"
src="{{video.showVideo(item,currentIndex,idx
,loadMedia
)?item.videoUrl:null}}"
src="{{video.showVideo(item,currentIndex,idx)?item.videoUrl:null}}"
data-id="{{item.id}}"
data-id="{{item.id}}"
data-index="{{idx}}"
data-index="{{idx}}"
binderror="onError"
binderror="onError"
...
@@ -135,7 +136,6 @@
...
@@ -135,7 +136,6 @@
pause: false,
pause: false,
curQueue: [],
curQueue: [],
currentIndex:0,
currentIndex:0,
loadMedia:[],
},
},
watch: {
watch: {
videoList () {
videoList () {
...
@@ -233,9 +233,8 @@
...
@@ -233,9 +233,8 @@
if (index !== current) {
if (index !== current) {
ctx && ctx.pause();
ctx && ctx.pause();
} else {
} else {
this.loadMedia.push(index);
//将视频重置到最开始的位置并播放
//将视频重置到最开始的位置并播放
ctx && ctx.seek(0);
//
ctx && ctx.seek(0);
ctx && ctx.play();
ctx && ctx.play();
}
}
});
});
...
...
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