Commit 42097f7b authored by ziyu's avatar ziyu

improvement: 规则视频不分享

parent bcd08d37
......@@ -3,7 +3,7 @@
<view class="container">
<swiper
class="video-swiper"
duration="700"
duration="600"
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) {
......
......@@ -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;
......
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