Commit 125eb59d by 穆启卓

1

parent 74b0b106
......@@ -617,19 +617,27 @@ Page({
method: 'POST',
success: res2 => {
if (res2.data.code === 0) {
wx.showToast({
title: '视频错误,请尝试其他方式赚取步数',
icon: 'none',
duration: 2000
});
this.data.bubbleList.forEach(item => {
if (item.task_type === 2) {
item.can_watch = false;
}
});
this.setData({
bubbleList: this.data.bubbleList
});
if (this.data.targetSteps) {
wx.showToast({
title: '视频错误,请尝试其他方式赚取步数',
icon: 'none',
duration: 2000
});
this.data.bubbleList.forEach(item => {
if (item.task_type === 2) {
item.can_watch = false;
}
});
this.setData({
bubbleList: this.data.bubbleList
});
} else {
wx.showToast({
title: '报名后将获取步数',
icon: 'none',
duration: 2000
});
}
}
}
});
......@@ -648,22 +656,30 @@ Page({
method: 'POST',
success: res2 => {
if (res2.data.code === 0) {
wx.showToast({
title: '获取步数成功',
icon: 'none',
duration: 2000
});
let earnStep = 0;
this.data.bubbleList.forEach(item => {
if (item.task_type === 2) {
item.can_watch = false;
earnStep = item.bonus_step;
}
});
this.setData({
bubbleList: this.data.bubbleList,
currentSteps: this.data.currentSteps + earnStep
});
if (this.data.targetSteps) {
wx.showToast({
title: '获取步数成功',
icon: 'none',
duration: 2000
});
let earnStep = 0;
this.data.bubbleList.forEach(item => {
if (item.task_type === 2) {
item.can_watch = false;
earnStep = item.bonus_step;
}
});
this.setData({
bubbleList: this.data.bubbleList,
currentSteps: this.data.currentSteps + earnStep
});
} else {
wx.showToast({
title: '报名后将获取步数',
icon: 'none',
duration: 2000
});
}
}
}
});
......
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