Commit 2446377f authored by AU-Pro-mac's avatar AU-Pro-mac

Merge branch 'yd11_20200922' of gitlab2.dui88.com:wanghongyu

parents e45e44de aeb8e765
......@@ -173,6 +173,24 @@ Page({
}
})
.catch(res => { console.warn(res); commonToast(res && res.message); }) || {};
this.checkDohelp();
},
checkDohelp(){
if(this.inviteId) {
//是分享落地页,可以助力
//todo 需要判断是不是会员
commonToast('准备5秒后给邀请者助力~');
setTimeout(() => {
API.doHelp({activityId: app.activityId,inviteId:this.inviteId}).then(res=>{
commonToast('助力成功~');
}).catch(err=>{
commonToast(JSON.stringify(err));
});
}, 5000);
}else{
commonToast('不是分享落地页,不需要走助力~')
}
},
......@@ -385,6 +403,33 @@ Page({
videoHideFunc() {
console.log('videoHideFunc')
this.setData({ videoShow: false })
if (this.videoSrcArr[this.data.videoActiveIndex].timeStamp >= 15) {
this.getWatchRewards()
}
},
// 观看视频领奖
getWatchRewards() {
API.sendCoinsByWatch({activityId: app.activityId, videoIndex: this.videoActiveIndex})
.then(res => {
const {success, data} = res
if (success) {
this.showCommonMoadalT2({
title: '看视频奖励',
content: `抽奖次数+${data.lotteryTimes}`,
confirmCallback1: () => {
navigateToOutside(app.vipUrl)
},
confirmCallback2: () => {
navigateToOutside(app.vipUrl)
},
btnImg1: '//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png',
btnImg2: '//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png',
})
} else {
}
})
},
videoShowFunc() {
......
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