Commit e6ef8160 authored by wildfirecode13's avatar wildfirecode13

1

parent 0e305bdf
......@@ -16,7 +16,7 @@
"completeTimes": 0,
"rewards": 10,
"sellerId": "oooo",
"status":2,
"status":1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺1"
......@@ -25,7 +25,7 @@
"completeTimes": 0,
"rewards": 10,
"sellerId": "wwwww",
"status":2,
"status":1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺2"
......
{
"success": 1,
"data": {
"value": "500",
"backTime": "1989897768",
"energy": "500",
"times": "1989897768",
"serverTime": "188888776"
},
"message":"fuck"
......
......@@ -60,7 +60,22 @@ Component({
}) || {};
// my.hideLoading();
if (success && data) {
commonToast('领取成功~');
let str = '领取成功~';
switch (taskType) {
case 'sign':
break;
case 'browseGoods':
break;
case 'follow':
break;
case 'invites':
str=`成功邀请${data.times}名好友,奖励为精力值+${data.energy}`
break;
default:
break;
}
commonToast(str);
}
my.__updateUserInfo__();
await this.getTaskList()
......@@ -74,7 +89,7 @@ Component({
switch (taskType) {
case 'browseGoods':
navigateToOutside( url );
navigateToOutside(url);
await this.handleGoBrowseGoods();
await this.getTaskList();
break;
......@@ -101,7 +116,7 @@ Component({
console.log('关注店铺失败', err);
});
commonToast(favorStatus ? '关注成功' : '关注失败');
if(favorStatus) {
if (favorStatus) {
await API.doFollowTask({ sellerId }).catch(res => {
commonToast(res && res.message);
}) || {};
......
......@@ -154,7 +154,6 @@ Page({
initCanvas() {
console.log('do init');
this.spark_startEngine();
},
spark_startEngine() {
......@@ -179,8 +178,6 @@ Page({
this.main.addGlobalEvent("toast", self.showToastHandler, self);
this.main.addGlobalEvent("loading", self.showLoadingHandler, self);
this.main.addGlobalEvent("hideloading", self.hideLoadingHandler, self);
this.doHelp();
}
},
fail: () => {
......
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