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 @@ ...@@ -16,7 +16,7 @@
"completeTimes": 0, "completeTimes": 0,
"rewards": 10, "rewards": 10,
"sellerId": "oooo", "sellerId": "oooo",
"status":2, "status":1,
"taskRateType": 1, "taskRateType": 1,
"taskType": "follow", "taskType": "follow",
"title": "关注店铺1" "title": "关注店铺1"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"completeTimes": 0, "completeTimes": 0,
"rewards": 10, "rewards": 10,
"sellerId": "wwwww", "sellerId": "wwwww",
"status":2, "status":1,
"taskRateType": 1, "taskRateType": 1,
"taskType": "follow", "taskType": "follow",
"title": "关注店铺2" "title": "关注店铺2"
......
{ {
"success": 1, "success": 1,
"data": { "data": {
"value": "500", "energy": "500",
"backTime": "1989897768", "times": "1989897768",
"serverTime": "188888776" "serverTime": "188888776"
}, },
"message":"fuck" "message":"fuck"
......
...@@ -60,7 +60,25 @@ Component({ ...@@ -60,7 +60,25 @@ Component({
}) || {}; }) || {};
// my.hideLoading(); // my.hideLoading();
if (success && data) { 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__(); my.__updateUserInfo__();
await this.getTaskList() await this.getTaskList()
...@@ -74,7 +92,7 @@ Component({ ...@@ -74,7 +92,7 @@ Component({
switch (taskType) { switch (taskType) {
case 'browseGoods': case 'browseGoods':
navigateToOutside( url ); navigateToOutside(url);
await this.handleGoBrowseGoods(); await this.handleGoBrowseGoods();
await this.getTaskList(); await this.getTaskList();
break; break;
...@@ -101,7 +119,7 @@ Component({ ...@@ -101,7 +119,7 @@ Component({
console.log('关注店铺失败', err); console.log('关注店铺失败', err);
}); });
commonToast(favorStatus ? '关注成功' : '关注失败'); commonToast(favorStatus ? '关注成功' : '关注失败');
if(favorStatus) { if (favorStatus) {
await API.doFollowTask({ sellerId }).catch(res => { await API.doFollowTask({ sellerId }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
......
...@@ -154,7 +154,6 @@ Page({ ...@@ -154,7 +154,6 @@ Page({
initCanvas() { initCanvas() {
console.log('do init'); console.log('do init');
this.spark_startEngine(); this.spark_startEngine();
}, },
spark_startEngine() { spark_startEngine() {
...@@ -179,8 +178,6 @@ Page({ ...@@ -179,8 +178,6 @@ Page({
this.main.addGlobalEvent("toast", self.showToastHandler, self); this.main.addGlobalEvent("toast", self.showToastHandler, self);
this.main.addGlobalEvent("loading", self.showLoadingHandler, self); this.main.addGlobalEvent("loading", self.showLoadingHandler, self);
this.main.addGlobalEvent("hideloading", self.hideLoadingHandler, self); this.main.addGlobalEvent("hideloading", self.hideLoadingHandler, self);
this.doHelp();
} }
}, },
fail: () => { 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