Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
f1655e8c
Commit
f1655e8c
authored
Sep 25, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f0e0a7fa
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
27 deletions
+98
-27
tmallCat.doBrowseGoodsTask.json
...c/canvas/game/mock/miniTb/tmallCat.doBrowseGoodsTask.json
+9
-0
tmallCat.doSignTask.json
project/src/canvas/game/mock/miniTb/tmallCat.doSignTask.json
+9
-0
tmallCat.getTaskList.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getTaskList.json
+3
-3
tmallCat.receiveTaskRewards.json
.../canvas/game/mock/miniTb/tmallCat.receiveTaskRewards.json
+9
-0
api.js
taobao_mini/client/api.js
+5
-0
app.js
taobao_mini/client/app.js
+1
-1
comtask.js
taobao_mini/client/components/comtask/comtask.js
+46
-18
comtasklist.axml
taobao_mini/client/components/comtasklist/comtasklist.axml
+4
-5
resList.js
taobao_mini/client/resconfig/resList.js
+12
-0
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.doBrowseGoodsTask.json
0 → 100644
View file @
f1655e8c
{
"success"
:
false
,
"data"
:
{
"value"
:
"500"
,
"backTime"
:
"1989897768"
,
"serverTime"
:
"188888776"
},
"message"
:
"fuck"
}
\ No newline at end of file
project/src/canvas/game/mock/miniTb/tmallCat.doSignTask.json
0 → 100644
View file @
f1655e8c
{
"success"
:
false
,
"data"
:
{
"value"
:
"500"
,
"backTime"
:
"1989897768"
,
"serverTime"
:
"188888776"
},
"message"
:
"fuck"
}
\ No newline at end of file
project/src/canvas/game/mock/miniTb/tmallCat.getTaskList.json
View file @
f1655e8c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
{
{
"completeTimes"
:
0
,
"completeTimes"
:
0
,
"rewards"
:
1
,
"rewards"
:
1
,
"status"
:
1
,
"status"
:
3
,
"taskRateType"
:
2
,
"taskRateType"
:
2
,
"taskType"
:
"sign"
,
"taskType"
:
"sign"
,
"times"
:
1
,
"times"
:
1
,
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
"completeTimes"
:
0
,
"completeTimes"
:
0
,
"itemIds"
:
""
,
"itemIds"
:
""
,
"rewards"
:
"2"
,
"rewards"
:
"2"
,
"status"
:
1
,
"status"
:
3
,
"taskRateType"
:
2
,
"taskRateType"
:
2
,
"taskType"
:
"browseGoods"
,
"taskType"
:
"browseGoods"
,
"times"
:
1
,
"times"
:
1
,
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
{
{
"completeTimes"
:
0
,
"completeTimes"
:
0
,
"rewards"
:
"1"
,
"rewards"
:
"1"
,
"status"
:
2
,
"status"
:
3
,
"taskRateType"
:
1
,
"taskRateType"
:
1
,
"taskType"
:
"invites"
,
"taskType"
:
"invites"
,
"times"
:
3
,
"times"
:
3
,
...
...
project/src/canvas/game/mock/miniTb/tmallCat.receiveTaskRewards.json
0 → 100644
View file @
f1655e8c
{
"success"
:
1
,
"data"
:
{
"value"
:
"500"
,
"backTime"
:
"1989897768"
,
"serverTime"
:
"188888776"
},
"message"
:
"fuck"
}
\ No newline at end of file
taobao_mini/client/api.js
View file @
f1655e8c
...
@@ -23,6 +23,11 @@ const request = tbccRequest({
...
@@ -23,6 +23,11 @@ const request = tbccRequest({
// api handle 列表
// api handle 列表
const
apiList
=
{
const
apiList
=
{
...
capi
,
...
capi
,
doBrowseGoodsTask
:
{
handle
:
'doBrowseGoodsTask'
,
method
:
'get'
,
isShowLoading
:
false
},
receiveTaskRewards
:
{
receiveTaskRewards
:
{
handle
:
'receiveTaskRewards'
,
handle
:
'receiveTaskRewards'
,
method
:
'get'
,
method
:
'get'
,
...
...
taobao_mini/client/app.js
View file @
f1655e8c
...
@@ -9,7 +9,7 @@ cloud.init({
...
@@ -9,7 +9,7 @@ cloud.init({
App
({
App
({
env
,
env
,
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
requestType
:
'local'
,
// yapi,cloud: 云函数
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
cloud
,
...
...
taobao_mini/client/components/comtask/comtask.js
View file @
f1655e8c
...
@@ -28,31 +28,59 @@ Component({
...
@@ -28,31 +28,59 @@ Component({
async
didMount
()
{
async
didMount
()
{
my
.
showLoading
();
my
.
showLoading
();
await
API
.
doSignTask
().
catch
(()
=>
{
});
await
API
.
doSignTask
().
catch
(()
=>
{
});
const
{
success
,
data
,
message
}
=
await
API
.
getTaskList
().
catch
(
res
=>
{
await
this
.
getTaskList
();
commonToast
(
res
&&
res
.
message
);
})
||
{};
my
.
hideLoading
();
my
.
hideLoading
();
//签到邀请关注浏览
let
list
=
[
findTask
(
'sign'
,
data
),
findTask
(
'invites'
,
data
)
];
list
=
list
.
concat
(
findFollowTask
(
'follow'
,
data
));
list
.
push
(
findTask
(
'browseGoods'
,
data
));
if
(
success
&&
data
)
{
this
.
setData
({
list
})
}
},
},
methods
:
{
methods
:
{
handleTapReceiveBtn
(
e
)
{
async
getTaskList
()
{
const
{
success
,
data
,
message
}
=
await
API
.
getTaskList
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
//签到邀请关注浏览
let
list
=
[
findTask
(
'sign'
,
data
),
findTask
(
'invites'
,
data
)
];
list
.
push
(
findTask
(
'browseGoods'
,
data
));
list
=
list
.
concat
(
findFollowTask
(
'follow'
,
data
));
if
(
success
&&
data
)
{
this
.
setData
({
list
})
}
},
async
handleTapReceiveBtn
(
e
)
{
if
(
flag
)
return
;
my
.
showLoading
();
flag
=
1
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
'handleTapReceiveBtn'
,
item
);
const
{
taskType
}
=
item
;
API
.
receiveTaskRewards
({
taskType
:
'sign'
});
const
{
success
,
data
,
message
}
=
await
API
.
receiveTaskRewards
({
taskType
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功~'
);
}
await
this
.
getTaskList
()
flag
=
0
;
},
},
handleTapGoBtn
(
e
)
{
async
handleTapGoBtn
(
e
)
{
if
(
flag
)
return
;
flag
=
1
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
'handleTapGoBtn'
,
item
.
type
);
const
{
taskType
}
=
item
;
console
.
log
(
'handleTapGoBtn'
,
taskType
);
switch
(
taskType
)
{
case
'browseGoods'
:
await
this
.
handleGoBrowseGoods
();
break
;
default
:
break
;
}
},
async
handleGoBrowseGoods
(
itemId
)
{
await
API
.
doBrowseGoodsTask
({
itemId
});
},
},
onModalClose
()
{
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
const
{
onModalClose
}
=
this
.
props
;
...
...
taobao_mini/client/components/comtasklist/comtasklist.axml
View file @
f1655e8c
...
@@ -8,15 +8,14 @@
...
@@ -8,15 +8,14 @@
<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_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_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_disabedbtn " a:if="{{item.status==3}}" src={{resList['0e0684af-21c7-48e2-9114-8599c1de33f1'].url}} />
<image class="task_sginicon " src={{resList['ca4c78b3-caf5-435b-ba32-f187f24d1795'].url}} />
<image class="task_sginicon "
a:if="{{item.taskType=='sign'}}"
src={{resList['ca4c78b3-caf5-435b-ba32-f187f24d1795'].url}} />
<image class="task_inviteicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_inviteicon "
a:if="{{item.taskType=='invites'}}"
src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_focusicon "
src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06
'].url}} />
<image class="task_focusicon "
a:if="{{item.taskType=='follow'}}" src={{resList['7f6ab236c2c0d17c38f1bfb5260d258ebf1cb630
'].url}} />
<image class="task_readicon "
src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab0
6'].url}} />
<image class="task_readicon "
a:if="{{item.taskType=='browseGoods'}}" src={{resList['91ef2cf1a80e41f9eeed67259f8e57ae5783afa
6'].url}} />
<label class="task_title ">{{item.title}}</label>
<label class="task_title ">{{item.title}}</label>
<label class="task_award ">精力 +{{item.rewards}}</label>
<label class="task_award ">精力 +{{item.rewards}}</label>
<label class="task_progress ">({{item.todayCompleteTimes}}/{{item.times}})</label>
<label class="task_progress ">({{item.todayCompleteTimes}}/{{item.times}})</label>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/resconfig/resList.js
View file @
f1655e8c
...
@@ -47,6 +47,18 @@ const resList = {
...
@@ -47,6 +47,18 @@ const resList = {
uuid
:
'61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'
,
uuid
:
'61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'
,
url
:
'//yun.duiba.com.cn/spark/assets/47eae016fe3e9e31f63b8c60324f33114e009117.png'
url
:
'//yun.duiba.com.cn/spark/assets/47eae016fe3e9e31f63b8c60324f33114e009117.png'
},
},
'7f6ab236c2c0d17c38f1bfb5260d258ebf1cb630'
:
{
name
:
'task_followicon'
,
ext
:
'.png'
,
uuid
:
'7f6ab236c2c0d17c38f1bfb5260d258ebf1cb630'
,
url
:
'//yun.duiba.com.cn/aurora/assets/7f6ab236c2c0d17c38f1bfb5260d258ebf1cb630.png'
},
'91ef2cf1a80e41f9eeed67259f8e57ae5783afa6'
:
{
name
:
'task_readicon'
,
ext
:
'.png'
,
uuid
:
'91ef2cf1a80e41f9eeed67259f8e57ae5783afa6'
,
url
:
'//yun.duiba.com.cn/aurora/assets/91ef2cf1a80e41f9eeed67259f8e57ae5783afa6.png'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment