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
4532d46b
Commit
4532d46b
authored
Sep 25, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/tianmaoxiaoyuan' into tianmaoxiaoyuan
parents
487bbcb5
f0e0a7fa
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
248 additions
and
53 deletions
+248
-53
tmallCat.getTaskList.json
...ect/src/canvas/game/mock/miniTb/tmallCat.getTaskList.json
+3
-3
api.js
taobao_mini/client/api.js
+10
-0
comtask.axml
taobao_mini/client/components/comtask/comtask.axml
+6
-22
comtask.js
taobao_mini/client/components/comtask/comtask.js
+13
-1
comtask.json
taobao_mini/client/components/comtask/comtask.json
+3
-1
comtasklist.acss
taobao_mini/client/components/comtasklist/comtasklist.acss
+155
-0
comtasklist.axml
taobao_mini/client/components/comtasklist/comtasklist.axml
+22
-0
comtasklist.js
taobao_mini/client/components/comtasklist/comtasklist.js
+25
-0
comtasklist.json
taobao_mini/client/components/comtasklist/comtasklist.json
+4
-0
pageshop.js
taobao_mini/client/pages/pageshop/pageshop.js
+0
-22
mini.project.json
taobao_mini/mini.project.json
+7
-4
No files found.
project/src/canvas/game/mock/miniTb/tmallCat.getTaskList.json
View file @
4532d46b
...
...
@@ -16,7 +16,7 @@
"completeTimes"
:
0
,
"rewards"
:
10
,
"sellerId"
:
"oooo"
,
"status"
:
1
,
"status"
:
3
,
"taskRateType"
:
1
,
"taskType"
:
"follow"
,
"title"
:
"关注店铺"
...
...
@@ -25,7 +25,7 @@
"completeTimes"
:
0
,
"rewards"
:
10
,
"sellerId"
:
"wwwww"
,
"status"
:
1
,
"status"
:
3
,
"taskRateType"
:
1
,
"taskType"
:
"follow"
,
"title"
:
"关注店铺"
...
...
@@ -46,7 +46,7 @@
{
"completeTimes"
:
0
,
"rewards"
:
"1"
,
"status"
:
1
,
"status"
:
2
,
"taskRateType"
:
1
,
"taskType"
:
"invites"
,
"times"
:
3
,
...
...
taobao_mini/client/api.js
View file @
4532d46b
...
...
@@ -23,6 +23,16 @@ const request = tbccRequest({
// api handle 列表
const
apiList
=
{
...
capi
,
receiveTaskRewards
:
{
handle
:
'receiveTaskRewards'
,
method
:
'get'
,
isShowLoading
:
false
},
doSignTask
:
{
handle
:
'doSignTask'
,
method
:
'get'
,
isShowLoading
:
false
},
getTaskList
:
{
handle
:
'getTaskList'
,
method
:
'get'
,
...
...
taobao_mini/client/components/comtask/comtask.axml
View file @
4532d46b
<view class="taskcontainer ">
<view class="task ">
<image class="task_bg " src={{resList['7d24398f-622f-4f20-9d7e-2d7237d7bc6b'].url}} />
<image class="task_close " onTap="onModalClose" src={{resList['33778cbf-8c4f-4d6f-a8e8-9ebc6f0c5cd0'].url}} />
<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 " src={{resList['b9f1cc3f-4620-44d8-85ae-187be0745ace'].url}} />
<image class="task_gobtn " src={{resList['9ee176ed-5204-4524-97f9-bf17ee698aa8'].url}} />
<image class="task_disabedbtn " src={{resList['0e0684af-21c7-48e2-9114-8599c1de33f1'].url}} />
<image class="task_sginicon " src={{resList['ca4c78b3-caf5-435b-ba32-f187f24d1795'].url}} />
<image class="task_inviteicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_focusicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_readicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<label class="task_title ">{{item.title}}</label>
<label class="task_award ">精力 +{{item.rewards}}</label>
<label class="task_progress ">(10/10)</label>
</view>
</view>
</view>
</view>
\ No newline at end of file
<task-list
list="{{list}}"
onHandleTapReceiveBtn="handleTapReceiveBtn"
onHandleTapGoBtn="handleTapGoBtn"
onModalClose="onModalClose"
></task-list>
taobao_mini/client/components/comtask/comtask.js
View file @
4532d46b
...
...
@@ -6,6 +6,7 @@ const app = getApp();
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
let
flag
=
0
;
const
findTask
=
(
key
,
list
)
=>
{
const
result
=
list
.
filter
(
i
=>
i
.
taskType
==
key
);
if
(
!
result
||
result
.
length
==
0
)
throw
new
Error
(
`不存在key=
${
key
}
的任务,请检查接口`
)
...
...
@@ -25,9 +26,12 @@ Component({
},
async
didMount
()
{
my
.
showLoading
();
await
API
.
doSignTask
().
catch
(()
=>
{
});
const
{
success
,
data
,
message
}
=
await
API
.
getTaskList
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
my
.
hideLoading
();
//签到邀请关注浏览
let
list
=
[
findTask
(
'sign'
,
data
),
...
...
@@ -41,11 +45,19 @@ Component({
},
methods
:
{
handleTapReceiveBtn
(
e
)
{
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
'handleTapReceiveBtn'
,
item
);
API
.
receiveTaskRewards
({
taskType
:
'sign'
});
},
handleTapGoBtn
(
e
)
{
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
'handleTapGoBtn'
,
item
.
type
);
},
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
// console.log('com task onModalClose')
}
}
});
\ No newline at end of file
taobao_mini/client/components/comtask/comtask.json
View file @
4532d46b
{
"component"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{
"task-list"
:
"/components/comtasklist/comtasklist"
}
}
\ No newline at end of file
taobao_mini/client/components/comtasklist/comtasklist.acss
0 → 100644
View file @
4532d46b
.taskcontainer {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20;
background: rgba(0, 0, 0, 0.5);
}
.task {
width: 750rpx;
height: 792rpx;
opacity: 1;
top: 100%;
margin-top: -792rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_bg {
width: 750rpx;
height: 792rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_close {
width: 57rpx;
height: 57rpx;
opacity: 1;
left: 684rpx;
top: 53rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task_list {
width: 100%;
height: auto;
/* background-color: black; */
display: flex;
flex-flow: row wrap;
align-content: flex-start;
padding: 162rpx 0 0 41rpx;
}
.task .task_item {
width: 668rpx;
height: 141rpx;
opacity: 1;
margin: 0 0rpx 16rpx 0;
position: relative;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_itembg {
width: 668rpx;
height: 141rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_receivebtn {
width: 165rpx;
height: 61rpx;
opacity: 1;
left: 479rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_gobtn {
width: 165rpx;
height: 61rpx;
opacity: 1;
left: 479rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_disabedbtn {
width: 165rpx;
height: 61rpx;
opacity: 1;
left: 479rpx;
top: 26rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_sginicon {
width: 90rpx;
height: 91rpx;
opacity: 1;
left: 25rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_inviteicon {
width: 90rpx;
height: 91rpx;
opacity: 1;
left: 25rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_focusicon {
width: 90rpx;
height: 91rpx;
opacity: 1;
left: 25rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_readicon {
width: 90rpx;
height: 91rpx;
opacity: 1;
left: 25rpx;
top: 25rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_title {
/* width: 52rpx; */
height: 26rpx;
opacity: 1;
left: 139rpx;
top: 36rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #685b4e;
}
.task .task_item .task_award {
width: 118rpx;
height: 24rpx;
opacity: 1;
left: 138rpx;
top: 78rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 26rpx;
color: #39abed;
}
.task .task_item .task_progress {
width: 90rpx;
height: 22rpx;
opacity: 1;
left: 517rpx;
top: 95rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 24rpx;
color: #685b4e;
}
taobao_mini/client/components/comtasklist/comtasklist.axml
0 → 100644
View file @
4532d46b
<view class="taskcontainer ">
<view class="task ">
<image class="task_bg " src={{resList['7d24398f-622f-4f20-9d7e-2d7237d7bc6b'].url}} />
<image class="task_close " onTap="onModalClose" src={{resList['33778cbf-8c4f-4d6f-a8e8-9ebc6f0c5cd0'].url}} />
<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_sginicon " src={{resList['ca4c78b3-caf5-435b-ba32-f187f24d1795'].url}} />
<image class="task_inviteicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_focusicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<image class="task_readicon " src={{resList['61cf4c2c-54e4-4cde-aa16-78ee5d17ab06'].url}} />
<label class="task_title ">{{item.title}}</label>
<label class="task_award ">精力 +{{item.rewards}}</label>
<label class="task_progress ">({{item.todayCompleteTimes}}/{{item.times}})</label>
</view>
</view>
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comtasklist/comtasklist.js
0 → 100644
View file @
4532d46b
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{
list
:
null
,
},
data
:
{
resList
:
resList
},
methods
:
{
handleTapReceiveBtn
(
e
)
{
this
.
props
.
onHandleTapReceiveBtn
(
e
);
},
handleTapGoBtn
(
e
)
{
this
.
props
.
onHandleTapGoBtn
(
e
);
},
onModalClose
()
{
this
.
props
.
onModalClose
();
}
}
});
\ No newline at end of file
taobao_mini/client/components/comtasklist/comtasklist.json
0 → 100644
View file @
4532d46b
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_mini/client/pages/pageshop/pageshop.js
View file @
4532d46b
...
...
@@ -46,28 +46,6 @@ Page({
flag
=
0
;
},
// async onItemExchange(_id) {
// const { success, data, message } = await API.exchangeGood({ _id }).catch(res => {
// commonToast(res && res.message)
// }) || {};
// // API.exchangeGood({ _id })
// // .then(() => {
// // _list.forEach(item => {
// // if (item._id == _id) {
// // item.exchanged = true;
// // }
// // })
// // console.log('_list', _list)
// // this.setData({ list: [] });
// // // this.updateData();
// // })
// // .catch(res => {
// // });
// },
async
getExchangeGoodList
()
{
const
{
data
:
{
list
,
happyCoin
}
}
=
await
API
.
exchangeGoodList
();
list
.
forEach
(
item
=>
{
...
...
taobao_mini/mini.project.json
View file @
4532d46b
{
"cloud"
:
{
"type"
:
"CLOUDAPP"
},
"miniprogramRoot"
:
"./client"
"cloud"
:
{
"type"
:
"CLOUDAPP"
},
"miniprogramRoot"
:
"./client"
,
"exclude"
:
[
"server/**"
]
}
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