Commit 07783be2 authored by Edwise's avatar Edwise 🍷

Merge remote-tracking branch 'refs/remotes/origin/tianmaoxiaoyuan' into tianmaoxiaoyuan

parents 7ee3ae78 33cfc33b
......@@ -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,25 @@ Component({
}) || {};
// my.hideLoading();
if (success && data) {
commonToast('领取成功~');
let str;
// switch (taskType) {
// case 'sign':
// break;
// case 'browseGoods':
// break;
// case 'follow':
// break;
// case 'invites':
// break;
// default:
// break;
// }
console.log('taskType',taskType)
if (taskType == 'invites')
str = `成功邀请${data.times}名好友,奖励为精力值+${data.energy}`
commonToast(str || '领取成功');
}
my.__updateUserInfo__();
await this.getTaskList()
......@@ -74,7 +92,7 @@ Component({
switch (taskType) {
case 'browseGoods':
navigateToOutside( url );
navigateToOutside(url);
await this.handleGoBrowseGoods();
await this.getTaskList();
break;
......@@ -101,7 +119,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