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
42097f7b
Commit
42097f7b
authored
Jun 24, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 规则视频不分享
parent
bcd08d37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
video.wpy
src/components/custom/video.wpy
+7
-7
index.wpy
src/pages/index.wpy
+6
-6
No files found.
src/components/custom/video.wpy
View file @
42097f7b
...
...
@@ -3,7 +3,7 @@
<view class="container">
<swiper
class="video-swiper"
duration="
7
00"
duration="
6
00"
circular="{{circular}}"
vertical
current="1"
...
...
@@ -142,6 +142,12 @@
if (e.$wx.detail.source === 'touch') {
const current = e.$wx.detail.current;
this.currentIndex = current;
//如果next中如果就剩下4个了,请求下一页
if(this.nextQueue.length === 4) {
getPrizeList().then(data=>{
this._videoListChanged(data);
})
}
}
},
animationfinish (e) {
...
...
@@ -191,12 +197,6 @@
this._invalidUp -= 1;
}
}
//如果next中如果就剩下4个了,请求下一页
if(nextQueue.length === 4) {
getPrizeList().then(data=>{
this._videoListChanged(data);
})
}
//当滑动到头时,circular改成false
let circular = true;
if (nextQueue.length === 0 && current !== 0) {
...
...
src/pages/index.wpy
View file @
42097f7b
...
...
@@ -195,7 +195,7 @@
<gold type="gold" :des="mainInfo && mainInfo.account && mainInfo.account.quantity || 0" :gold="sign" :isReceive="isReceive" @resetAddGold="resetAddGold" @showCorn="cornModalShow"></gold>
<sign type="sign" des="签到" :sign="sign" @sign-in="signIn"></sign>
<lottery type="lottery" des="抽奖" @getAwards="getAwards" @getUserInfo="getUserInfo" :authmodal="authmodal"></lottery>
<share type="share" des="分享"></share>
<share type="share" des="分享"
v-if="awardsInfo.id == undefined || awardsInfo.id >0"
></share>
</view>
<activity-list :activityList="activityList"></activity-list>
<network v-if="isConnected === false"/>
...
...
@@ -237,7 +237,6 @@
import Dialog from '../components/vant/dialog/dialog';
import { login, register, getMainInfo, addGold, getPrizeList, signIn, getActivityFeed, checkCornCode } from '../common/api.js';
let flag = false;
let awardsInfo = {};
wepy.page({
store,
data: {
...
...
@@ -256,6 +255,7 @@
cornTextShow: true,
searchStyle:'',
avtivityModal: false, //展示活动弹窗
awardsInfo:{},
},
computed: {
...
...
@@ -348,8 +348,8 @@
const openid = wx.getStorageSync('openId');
return {
title: `${(this.$wepy.userInfo && this.$wepy.userInfo.nickName) || '您的好朋友'}邀请您来抽奖啦~`,
path: `/pages/index?openid=${openid}&prizeId=${awardsInfo.id}`,
imageUrl: decodeURIComponent(awardsInfo.photoUrl),
path: `/pages/index?openid=${openid}&prizeId=${
this.$wepy.
awardsInfo.id}`,
imageUrl: decodeURIComponent(
this.$wepy.
awardsInfo.photoUrl),
success: function(res) {
let shareId = res.shareTickets[0];
console.log('shareId', shareId);
...
...
@@ -360,7 +360,7 @@
};
},
getAwards: function() {
const { id, photoUrl, name, chance } = awardsInfo;
const { id, photoUrl, name, chance } =
this.
awardsInfo;
if ((!id && id !== 0) || !this.mainInfo || !this.mainInfo.account) {
Notify({ message: '服务器异常,请稍后重试', safeAreaInsetTop: true });
return;
...
...
@@ -379,7 +379,7 @@
});
},
getAwardsInfo: function(v) {
awardsInfo = v;
this.
awardsInfo = v;
},
showMenu: function(v) {
this.showModal = v ? 3 : 0;
...
...
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