Commit c73bc7cb authored by Edwise's avatar Edwise 🍷

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

parents 61ba286a 1e17ae37
...@@ -4,7 +4,7 @@ import resList from '../../resconfig/resList'; ...@@ -4,7 +4,7 @@ import resList from '../../resconfig/resList';
import API from '../../api'; import API from '../../api';
const app = getApp(); const app = getApp();
const { tbcc } = app; const { tbcc } = app;
const { commonToast,favorShop } = tbcc.tb; const { commonToast, favorShop, navigateToOutside } = tbcc.tb;
let flag = 0; let flag = 0;
const findTask = (key, list) => { const findTask = (key, list) => {
...@@ -54,8 +54,8 @@ Component({ ...@@ -54,8 +54,8 @@ Component({
// my.showLoading(); // my.showLoading();
flag = 1; flag = 1;
const { item } = e.target.dataset; const { item } = e.target.dataset;
const { taskType,sellerId } = item; const { taskType, sellerId } = item;
const { success, data, message } = await API.receiveTaskRewards({ taskType,sellerId }).catch(res => { const { success, data, message } = await API.receiveTaskRewards({ taskType, sellerId }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
// my.hideLoading(); // my.hideLoading();
...@@ -70,12 +70,13 @@ Component({ ...@@ -70,12 +70,13 @@ Component({
if (flag) return; if (flag) return;
flag = 1; flag = 1;
const { item } = e.target.dataset; const { item } = e.target.dataset;
const { taskType,sellerId } = item; const { taskType, sellerId, itemId, url } = item;
switch (taskType) { switch (taskType) {
case 'browseGoods': case 'browseGoods':
await this.handleGoBrowseGoods(); await this.handleGoBrowseGoods();
await this.getTaskList(); await this.getTaskList();
navigateToOutside( url );
break; break;
case 'follow': case 'follow':
await this.handleGoFollow(sellerId); await this.handleGoFollow(sellerId);
...@@ -96,7 +97,7 @@ Component({ ...@@ -96,7 +97,7 @@ Component({
}) || {}; }) || {};
}, },
async handleGoFollow(sellerId) { async handleGoFollow(sellerId) {
await API.doFollowTask({sellerId}).catch(res => { await API.doFollowTask({ sellerId }).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
......
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