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