Commit d459f023 authored by wildfirecode13's avatar wildfirecode13

1

parent 33cfc33b
......@@ -16,7 +16,7 @@
"completeTimes": 0,
"rewards": 10,
"sellerId": "oooo",
"status":1,
"status": 1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺1"
......@@ -25,7 +25,7 @@
"completeTimes": 0,
"rewards": 10,
"sellerId": "wwwww",
"status":1,
"status": 1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺2"
......@@ -34,7 +34,7 @@
"completeTimes": 0,
"itemIds": "",
"rewards": "2",
"status":2,
"status": 1,
"taskRateType": 2,
"taskType": "browseGoods",
"times": 1,
......@@ -46,7 +46,7 @@
{
"completeTimes": 0,
"rewards": "1",
"status": 2,
"status": 1,
"taskRateType": 1,
"taskType": "invites",
"times": 3,
......
......@@ -27,7 +27,6 @@ Component({
async didMount() {
my.showLoading();
await API.doSignTask().catch(() => { });
await this.getTaskList();
my.hideLoading();
},
......@@ -103,12 +102,21 @@ Component({
case 'invites':
my.showSharePanel();
break;
case 'sign':
await this.handleGoSign();
await this.getTaskList();
break;
default:
console.log('handleTapGoBtn', taskType);
break;
}
flag = 0;
},
async handleGoSign() {
await API.doSignTask( ).catch(res => {
commonToast(res && res.message);
}) || {};
},
async handleGoBrowseGoods(itemId) {
await API.doBrowseGoodsTask({ itemId }).catch(res => {
commonToast(res && res.message);
......
......@@ -5,9 +5,10 @@
<view class="task_list">
<view class="task_item " a:for="{{list}}">
<image class="task_itembg " src={{resList['b44bac8c-652f-496d-9bc1-165e30d71b02'].url}} />
<image class="task_receivebtn " data-item="{{item}}" onTap="handleTapReceiveBtn" a:if="{{item.status==2}}" src={{resList['b9f1cc3f-4620-44d8-85ae-187be0745ace'].url}} />
<image class="task_gobtn " data-item="{{item}}" onTap="handleTapGoBtn" a:if="{{item.status==1}}" src={{resList['9ee176ed-5204-4524-97f9-bf17ee698aa8'].url}} />
<image class="task_disabedbtn " a:if="{{item.status==3}}" src={{resList['0e0684af-21c7-48e2-9114-8599c1de33f1'].url}} />
<image class="task_receivebtn " data-item="{{item}}" onTap="handleTapReceiveBtn" a:if="{{item.status==2}}" src={{resList['b9f1cc3f-4620-44d8-85ae-187be0745ace'+(item.taskType=='sign' ? '':'')].url}} />
<image class="task_gobtn " data-item="{{item}}" onTap="handleTapGoBtn" a:if="{{item.status==1}}" src={{resList['9ee176ed-5204-4524-97f9-bf17ee698aa8-'+item.taskType].url}} />
<image class="task_disabedbtn " a:if="{{item.status==3}}" src={{resList['0e0684af-21c7-48e2-9114-8599c1de33f1'+ (item.taskType=='follow' ? '-follow':'') ].url}} />
<image class="task_sginicon " a:if="{{item.taskType=='sign'}}" src={{resList['ca4c78b3-caf5-435b-ba32-f187f24d1795'].url}} />
<image class="task_inviteicon " a:if="{{item.taskType=='invites'}}" src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_focusicon " a:if="{{item.taskType=='follow'}}" src={{resList['7f6ab236c2c0d17c38f1bfb5260d258ebf1cb630'].url}} />
......
......@@ -95,7 +95,7 @@ Page({
console.log('on ready')
//授权和登录先搞
// await this.getAuth();
await this.getAuth();
// this.initCanvas();
my.__onMessage__ = (e) => {
this.onMessage(e)
......
......@@ -23,18 +23,54 @@ const resList = {
uuid: 'b9f1cc3f-4620-44d8-85ae-187be0745ace',
url: '//yun.duiba.com.cn/spark/assets/58527ff02cd996f196deade9cf46ed252e2791f6.png'
},
'b9f1cc3f-4620-44d8-85ae-187be0745ace-sign': {
name: 'task_receivebtn',
ext: '.png',
uuid: 'b9f1cc3f-4620-44d8-85ae-187be0745ace-sign',
url: '//yun.duiba.com.cn/aurora/assets/83ee636c40fe4437e632b8ce1197afbb47123edf.png'
},
'9ee176ed-5204-4524-97f9-bf17ee698aa8': {
name: 'task_gobtn',
ext: '.png',
uuid: '9ee176ed-5204-4524-97f9-bf17ee698aa8',
url: '//yun.duiba.com.cn/spark/assets/f33d667af53b09f154259c209fc0c41454dfca8a.png'
},
'9ee176ed-5204-4524-97f9-bf17ee698aa8-sign': {
name: 'task_gobtn',
ext: '.png',
uuid: '9ee176ed-5204-4524-97f9-bf17ee698aa8-sign',
url: '//yun.duiba.com.cn/aurora/assets/83ee636c40fe4437e632b8ce1197afbb47123edf.png'
},
'9ee176ed-5204-4524-97f9-bf17ee698aa8-follow': {
name: 'task_gobtn',
ext: '.png',
uuid: '9ee176ed-5204-4524-97f9-bf17ee698aa8-follow',
url: '//yun.duiba.com.cn/aurora/assets/b30cdc10518b7cbd68875e1a5ec8b5db4d6458cc.png'
},
'9ee176ed-5204-4524-97f9-bf17ee698aa8-browseGoods': {
name: 'task_gobtn',
ext: '.png',
uuid: '9ee176ed-5204-4524-97f9-bf17ee698aa8-browseGoods',
url: '//yun.duiba.com.cn/aurora/assets/50886651a4b369800cad1e9b958b9edc86150533.png'
},
'9ee176ed-5204-4524-97f9-bf17ee698aa8-invites': {
name: 'task_gobtn',
ext: '.png',
uuid: '9ee176ed-5204-4524-97f9-bf17ee698aa8-invites',
url: '//yun.duiba.com.cn/aurora/assets/76116db5fc5039831f3e266f9b9d1d8e5c0ece7b.png'
},
'0e0684af-21c7-48e2-9114-8599c1de33f1': {
name: 'task_disabedbtn',
ext: '.png',
uuid: '0e0684af-21c7-48e2-9114-8599c1de33f1',
url: '//yun.duiba.com.cn/spark/assets/2ef2430ab9ec9d0bde4bc1e12f396456578cf3f7.png'
},
'0e0684af-21c7-48e2-9114-8599c1de33f1-follow': {
name: 'task_disabedbtn_follow',
ext: '.png',
uuid: '0e0684af-21c7-48e2-9114-8599c1de33f1-follow',
url: '//yun.duiba.com.cn/aurora/assets/70da64eedbc8b631e546185950cca481f775edea.png'
},
'ca4c78b3-caf5-435b-ba32-f187f24d1795': {
name: 'task_sginicon',
ext: '.png',
......
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