Commit cd72f831 by 穆启卓

解决banner广告和视频冲突

视频有后端控制显不显示
parent c82fc79e
......@@ -535,30 +535,38 @@ Page({
if (app.globalData.referrerAppid && app.globalData.scene === 1038) {
const bubbleLeaveTime = wx.getStorageSync('bubbleLeaveTime') || 0;
const bubbleId = wx.getStorageSync('bubbleId');
if (Date.now() - bubbleLeaveTime > 10000 && bubbleId) { // 体验成功,可以加步数
requestData.data = {
task_id: bubbleId
};
requestData.method = 'POST';
requestData.success = res => {
console.log('earnStep', res)
if (res.data.code === 0) {
wx.showToast({
title: '恭喜赚取步数成功',
icon: 'none',
duration: 2000
});
this.setData({
bubbleList: res.data.data
});
}
};
} else {
return wx.showToast({
title: '体验不达标,获赠步数失败',
icon: 'none',
duration: 2000
})
console.log('earnStep', bubbleLeaveTime)
console.log('earnStep', bubbleId)
wx.removeStorageSync('bubbleLeaveTime');
wx.removeStorageSync('bubbleId');
console.log('earnStep', bubbleLeaveTime)
console.log('earnStep', bubbleId)
if (bubbleId) {
if (Date.now() - bubbleLeaveTime > 10000) { // 体验成功,可以加步数
requestData.data = {
task_id: bubbleId
};
requestData.method = 'POST';
requestData.success = res => {
console.log('earnStep', res)
if (res.data.code === 0) {
wx.showToast({
title: '恭喜赚取步数成功',
icon: 'none',
duration: 2000
});
this.setData({
bubbleList: res.data.data
});
}
};
} else {
return wx.showToast({
title: '体验不达标,获赠步数失败',
icon: 'none',
duration: 2000
})
}
}
}
wx.request(requestData);
......@@ -654,6 +662,7 @@ Page({
this.data.bubbleList.forEach(item => {
if (item.task_type === 2) {
earnStep = item.bonus_step;
item.can_watch = res2.data.data.can_watch;
}
});
this.setData({
......@@ -667,7 +676,7 @@ Page({
});
}
wx.showModal({
content: `恭喜增加${earnStep}步数成功`,
content: `恭喜成功增加${earnStep}步数`,
showCancel: false
});
}
......
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