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
133e84b4
Commit
133e84b4
authored
Oct 13, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务
parent
ca2c2080
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
105805 additions
and
400 deletions
+105805
-400
comunlockstepmodal.jsx
.../src/components/comunlockstepmodal/comunlockstepmodal.jsx
+29
-0
comunlockstepmodal.less
...src/components/comunlockstepmodal/comunlockstepmodal.less
+97
-0
api.js
taobao_jn/client/api.js
+20
-0
app.acss
taobao_jn/client/app.acss
+3
-1
comtask.acss
taobao_jn/client/components/comtask/comtask.acss
+29
-8
comtask.js
taobao_jn/client/components/comtask/comtask.js
+168
-121
comtasklist.axml
taobao_jn/client/components/comtasklist/comtasklist.axml
+16
-13
comunlockstepmodal.acss
...ent/components/comunlockstepmodal/comunlockstepmodal.acss
+98
-0
comunlockstepmodal.axml
...ent/components/comunlockstepmodal/comunlockstepmodal.axml
+12
-0
comunlockstepmodal.js
...lient/components/comunlockstepmodal/comunlockstepmodal.js
+39
-0
comunlockstepmodal.json
...ent/components/comunlockstepmodal/comunlockstepmodal.json
+4
-0
goodsModal.axml
taobao_jn/client/components/goodsModal/goodsModal.axml
+3
-3
goodsModal.js
taobao_jn/client/components/goodsModal/goodsModal.js
+123
-92
goodsPage.axml
taobao_jn/client/pages/goodsPage/goodsPage.axml
+2
-0
goodsPage.js
taobao_jn/client/pages/goodsPage/goodsPage.js
+188
-120
pagegamemain.json
taobao_jn/client/pages/pagegamemain/pagegamemain.json
+2
-1
pagepageindex.acss
taobao_jn/client/pages/pagepageindex/pagepageindex.acss
+1
-1
pagepageindex.axml
taobao_jn/client/pages/pagepageindex/pagepageindex.axml
+12
-5
pagepageindex.js
taobao_jn/client/pages/pagepageindex/pagepageindex.js
+5
-6
pagepageindex.json
taobao_jn/client/pages/pagepageindex/pagepageindex.json
+6
-1
pagepagerank.acss
taobao_jn/client/pages/pagepagerank/pagepagerank.acss
+1
-1
pagepagerank.axml
taobao_jn/client/pages/pagepagerank/pagepagerank.axml
+2
-2
pagepagerank.js
taobao_jn/client/pages/pagepagerank/pagepagerank.js
+59
-24
resList.js
taobao_jn/client/resconfig/resList.js
+44
-1
debug.log
taobao_jn/debug.log
+104648
-0
jn.getActivityBaseInfoById.json
taobao_jn/mocks/jn.getActivityBaseInfoById.json
+18
-0
jn.getCollectGoodsList.json
taobao_jn/mocks/jn.getCollectGoodsList.json
+54
-0
jn.getItemListByItemIds.json
taobao_jn/mocks/jn.getItemListByItemIds.json
+54
-0
jn.getTaskList.json
taobao_jn/mocks/jn.getTaskList.json
+59
-0
jn.login.json
taobao_jn/mocks/jn.login.json
+9
-0
No files found.
project/src/components/comunlockstepmodal/comunlockstepmodal.jsx
0 → 100644
View file @
133e84b4
'use strict'
;
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
import
'./comunlockstepmodal.less'
;
class
Comunlockstepmodal
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
resList
:
resList
};
}
render
()
{
return
(
<
div
className=
"unlockstepmodal "
>
<
img
className=
"unlockstepbg "
src=
{
this
.
state
.
resList
[
'cae8e0bb-e05f-4bc7-b77d-24b9f1e9492c'
].
url
}
/>
<
div
className=
"unlocksteptext "
>
<
span
className=
"unlocksteptitle1 "
>
恭喜您解锁7系赛段
</
span
>
<
span
className=
"unlocksteptitle2 "
>
进入三人场
</
span
>
<
span
className=
"unlockstepprizedesc "
>
奖品可在 我的奖品 中查看
</
span
>
<
span
className=
"unlockstepname "
>
产品六字名称
</
span
>
</
div
>
<
img
className=
"unlockstepbtn "
src=
{
this
.
state
.
resList
[
'3078345c-9a38-4d1f-9361-eb7a2587d99e'
].
url
}
/>
<
img
className=
"unlockstepclose "
src=
{
this
.
state
.
resList
[
'90b5f539-4c56-4210-937e-8dd359fbb2b0'
].
url
}
/>
<
img
className=
"unlockstepprizeimg "
/>
</
div
>
);
}
}
export
default
Comunlockstepmodal
;
\ No newline at end of file
project/src/components/comunlockstepmodal/comunlockstepmodal.less
0 → 100644
View file @
133e84b4
.unlockstepmodal {
width: 527px;
height: 802px;
opacity: 1;
left: 111px;
top: 338px;
position: absolute;
transform-origin: 0px 0px 0px;
.unlockstepbg {
width: 527px;
height: 688px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.unlocksteptext {
width: 366px;
height: 586px;
opacity: 1;
left: 80px;
top: 58px;
position: absolute;
transform-origin: 0px 0px 0px;
.unlocksteptitle1 {
width: 366px;
height: 40px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 42px;
color: rgba(0, 0, 0, 1);
}
.unlocksteptitle2 {
width: 312px;
height: 24px;
opacity: 1;
left: 26px;
top: 62px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(0, 0, 0, 1);
text-align: center;
}
.unlockstepprizedesc {
width: 245px;
height: 20px;
opacity: 1;
left: 60px;
top: 566px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 20px;
color: rgba(0, 0, 0, 1);
display: none;
}
.unlockstepname {
width: 218px;
height: 35px;
opacity: 1;
left: 72px;
top: 397px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 36px;
color: rgba(0, 0, 0, 1);
}
}
.unlockstepbtn {
width: 363px;
height: 73px;
opacity: 1;
left: 82px;
top: 534px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.unlockstepclose {
width: 72px;
height: 72px;
opacity: 1;
left: 227px;
top: 730px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.unlockstepprizeimg {
width: 262px;
height: 262px;
opacity: 1;
display: block;
left: 134px;
top: 180px;
position: absolute;
transform-origin: 0px 0px 0px;
}
}
\ No newline at end of file
taobao_jn/client/api.js
View file @
133e84b4
...
...
@@ -39,6 +39,11 @@ const apiList = {
method
:
'get'
,
isShowLoading
:
false
},
doCollectGoodsTask
:
{
handle
:
'doCollectGoodsTask'
,
method
:
'get'
,
isShowLoading
:
false
},
receiveTaskRewards
:
{
handle
:
'receiveTaskRewards'
,
method
:
'get'
,
...
...
@@ -74,6 +79,21 @@ const apiList = {
method
:
'get'
,
isShowLoading
:
false
},
getCollectGoodsList
:
{
handle
:
'getCollectGoodsList'
,
method
:
'get'
,
isShowLoading
:
false
},
getItemListByItemIds
:
{
handle
:
'getItemListByItemIds'
,
method
:
'get'
,
isShowLoading
:
false
},
login
:
{
handle
:
'login'
,
method
:
'get'
,
isShowLoading
:
false
},
/**获取游戏信息 */
getGameInfo
:
{
handle
:
'getGameInfo'
,
...
...
taobao_jn/client/app.acss
View file @
133e84b4
...
...
@@ -27,13 +27,15 @@ page {
left: 50%;
margin-left:-375rpx;
margin-top:-812rpx;
z-index: 100;
background: rgba(0, 0, 0, 0.5);
}
.popcontainer_down {
position: fixed;
width: 750rpx;
height:
1624
rpx;
height:
2000
rpx;
bottom:0rpx;
z-index: 100;
background: rgba(0, 0, 0, 0.5);
}
.btn:active {
...
...
taobao_jn/client/components/comtask/comtask.acss
View file @
133e84b4
...
...
@@ -24,23 +24,34 @@
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_close {
width:
57
rpx;
height:
57
rpx;
width:
72
rpx;
height:
72
rpx;
opacity: 1;
left: 6
84
rpx;
top:
53
rpx;
left: 6
51
rpx;
top:
-91
rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .taskmodaltitle {
width: 750rpx;
height: 39rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 42rpx;
color: rgba(0, 0, 0, 1);
text-align: center;
top: 24rpx;
}
.task_list {
width: 100%;
height: 6
2
0rpx;
height: 6
4
0rpx;
/* background-color: black; */
display: flex;
flex-flow: row wrap;
align-content: flex-start;
margin-top: 1
6
2rpx;
margin-top: 1
2
2rpx;
padding: 0rpx 0 0 41rpx;
overflow-x: auto;
}
...
...
@@ -122,16 +133,26 @@
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.task .task_item .task_favoricon {
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:
36
rpx;
top:
20
rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #685b4e;
font-weight: bolder;
}
.task .task_item .task_award {
width: 118rpx;
...
...
@@ -142,7 +163,7 @@
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 26rpx;
color: #
39abed
;
color: #
685b4e
;
}
.task .task_item .task_progress {
width: 200rpx;
...
...
taobao_jn/client/components/comtask/comtask.js
View file @
133e84b4
...
...
@@ -3,141 +3,188 @@
import
resList
from
'../../resconfig/resList'
;
import
API
from
'../../api'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
,
favorShop
,
navigateToOutside
}
=
tbcc
.
tb
;
const
{
tbcc
}
=
app
;
const
{
commonToast
,
favorShop
,
navigateToOutside
}
=
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
}
的任务,请检查接口`
)
return
result
[
0
]
const
result
=
list
.
filter
(
i
=>
i
.
taskType
==
key
);
if
(
!
result
||
result
.
length
==
0
)
throw
new
Error
(
`不存在key=
${
key
}
的任务,请检查接口`
)
return
result
[
0
]
};
const
findFollowTask
=
(
key
,
list
)
=>
{
const
result
=
list
.
filter
(
i
=>
i
.
taskType
==
key
);
if
(
!
result
||
result
.
length
==
0
)
throw
new
Error
(
`不存在key=
${
key
}
的任务,请检查接口`
)
return
result
;
const
result
=
list
.
filter
(
i
=>
i
.
taskType
==
key
);
if
(
!
result
||
result
.
length
==
0
)
throw
new
Error
(
`不存在key=
${
key
}
的任务,请检查接口`
)
return
result
;
};
Component
({
props
:
{},
data
:
{
resList
:
resList
,
list
:
[]
},
props
:
{},
data
:
{
resList
:
resList
,
list
:
[]
},
async
didMount
()
{
my
.
showLoading
();
await
this
.
getTaskList
();
my
.
hideLoading
();
},
async
didMount
()
{
my
.
showLoading
();
await
this
.
getTaskList
();
my
.
hideLoading
();
},
methods
:
{
async
getTaskList
()
{
const
{
success
,
data
,
message
}
=
await
API
.
getTaskList
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
methods
:
{
async
getTaskList
()
{
const
{
success
,
data
,
message
}
=
await
API
.
getTaskList
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
&&
data
)
{
//签到邀请关注浏览
let
list
=
[
findTask
(
'sign'
,
data
),
findTask
(
'follow'
,
data
)
// findTask('invites', data)
];
list
.
push
(
findTask
(
'browseGoods'
,
data
));
list
=
list
.
concat
(
findFollowTask
(
'collectGoods'
,
data
));
console
.
log
(
list
);
this
.
setData
({
list
})
}
},
async
handleTapReceiveBtn
(
e
)
{
if
(
flag
)
return
;
// my.showLoading();
flag
=
1
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
taskType
,
sellerId
}
=
item
;
const
{
success
,
data
,
message
}
=
await
API
.
receiveTaskRewards
({
taskType
,
sellerId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
// my.hideLoading();
if
(
success
&&
data
)
{
let
str
;
// switch (taskType) {
// case 'sign':
// break;
// case 'browseGoods':
// break;
// case 'follow':
// break;
// case 'invites':
// break;
//签到邀请关注浏览
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
{
taskType
,
sellerId
}
=
item
;
const
{
success
,
data
,
message
}
=
await
API
.
receiveTaskRewards
({
taskType
,
sellerId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
// my.hideLoading();
if
(
success
&&
data
)
{
let
str
;
// switch (taskType) {
// case 'sign':
// break;
// case 'browseGoods':
// break;
// case 'follow':
// break;
// case 'invites':
// break;
// default:
// break;
// default:
// break;
// }
console
.
log
(
'taskType'
,
taskType
)
if
(
taskType
==
'invites'
)
str
=
`成功邀请
${
data
.
times
}
名好友,奖励为精力值+
${
data
.
energy
}
`
commonToast
(
str
||
'领取成功'
);
}
/**领取成功,增加温暖值 */
// }
console
.
log
(
'taskType'
,
taskType
)
if
(
taskType
==
'invites'
)
str
=
`成功邀请
${
data
.
times
}
名好友,奖励为精力值+
${
data
.
energy
}
`
commonToast
(
str
||
'领取成功'
);
}
my
.
__updateUserInfo__
();
await
this
.
getTaskList
()
flag
=
0
;
},
async
handleTapGoBtn
(
e
)
{
if
(
flag
)
return
;
flag
=
1
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
taskType
,
sellerId
,
itemId
,
url
}
=
item
;
await
this
.
getTaskList
()
flag
=
0
;
},
async
handleTapGoBtn
(
e
)
{
if
(
flag
)
return
;
flag
=
1
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
taskType
,
sellerId
,
itemId
,
url
,
itemIds
}
=
item
;
switch
(
taskType
)
{
case
'browseGoods'
:
navigateToOutside
(
url
);
await
this
.
handleGoBrowseGoods
();
await
this
.
getTaskList
();
break
;
case
'follow'
:
await
this
.
handleGoFollow
(
sellerId
);
await
this
.
getTaskList
();
break
;
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
);
})
||
{};
},
async
handleGoFollow
(
sellerId
)
{
console
.
log
(
'handleGoFollow'
,
sellerId
)
const
favorStatus
=
await
favorShop
(
sellerId
).
catch
(
err
=>
{
console
.
log
(
'关注店铺失败'
,
err
);
});
commonToast
(
favorStatus
?
'关注成功'
:
'关注失败'
);
if
(
favorStatus
)
{
await
API
.
doFollowTask
({
sellerId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
}
},
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
// console.log('com task onModalClose')
switch
(
taskType
)
{
case
'collectGoods'
:
await
this
.
handleGoColletcGoods
(
itemIds
);
await
this
.
getTaskList
();
break
;
case
'browseGoods'
:
await
this
.
handleGoBrowseGoods
(
itemIds
);
await
this
.
getTaskList
();
break
;
case
'follow'
:
setTimeout
(()
=>
{
flag
=
0
;
},
1000
);
await
this
.
handleGoFollow
(
sellerId
);
await
this
.
getTaskList
();
break
;
case
'sign'
:
await
this
.
handleGoSign
();
await
this
.
getTaskList
();
break
;
default
:
console
.
log
(
'handleTapGoBtn'
,
taskType
);
break
;
}
flag
=
0
;
},
async
handleGoColletcGoods
(
itemIds
)
{
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=collectGoods&&itemIds='
+
itemIds
})
},
async
handleGoSign
()
{
await
API
.
doSignTask
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
},
async
handleGoBrowseGoods
(
itemIds
)
{
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=browseGoods&&itemIds='
+
itemIds
})
},
async
handleGoFollow
(
sellerId
)
{
console
.
log
(
'handleGoFollow'
,
sellerId
)
const
favorStatus
=
await
favorShop
(
sellerId
).
catch
(
err
=>
{
console
.
log
(
'关注店铺失败'
,
err
);
});
commonToast
(
favorStatus
?
'关注成功'
:
'关注失败'
);
if
(
favorStatus
)
{
await
API
.
doFollowTask
({
sellerId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
}
},
onModalClose
()
{
const
{
onModalClose
}
=
this
.
props
;
onModalClose
&&
onModalClose
();
// console.log('com task onModalClose')
}
}
}
});
\ No newline at end of file
taobao_jn/client/components/comtasklist/comtasklist.axml
View file @
133e84b4
<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}} />
<image class="task_bg " src={{resList['feaed213-a6d1-4e32-8444-5c823923f299'].url}} />
<image class="task_close " onTap="onModalClose" src={{resList['8797382d-2b38-432e-85d3-6a2160304723'].url}} />
<label class="taskmodaltitle">任务中心</label>
<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'+(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_itembg " src={{resList['726bc3e9-0f05-4d3f-8812-d9cb87c5efd1'].url}} />
<image class="task_receivebtn " data-item="{{item}}" onTap="handleTapReceiveBtn" a:if="{{item.status==2}}" src={{resList['437257fe-ed18-4a3c-a428-5459ea4e9736'].url}} />
<image class="task_gobtn " data-item="{{item}}" onTap="handleTapGoBtn" a:if="{{item.status==1}}" src={{resList['24b5da2e-3b36-476a-9e74-090cc96542cf'].url}} />
<image class="task_disabedbtn " a:if="{{item.status==3}}" src={{resList['9c4565f2-d6f8-4a33-9cea-c04c5f3cd7a1'].url}} />
<image class="task_sginicon " a:if="{{item.taskType=='sign'}}" src={{resList['8825062d-8f99-4eae-b961-e52ad9707a80'].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['55bfd46b-b5d5-4942-aecb-ff63633cbbdc'].url}} />
<image class="task_readicon " a:if="{{item.taskType=='browseGoods'}}" src={{resList['e3bef9e1-07a4-408d-b387-a9ac08c4b7f0'].url}} />
<image class="task_favoricon " a:if="{{item.taskType=='collectGoods'}}" src={{resList['a03d17c7-c4f0-42e0-9430-be61f5eb68d5'].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}} />
<image class="task_readicon " a:if="{{item.taskType=='browseGoods'}}" src={{resList['91ef2cf1a80e41f9eeed67259f8e57ae5783afa6'].url}} />
<label class="task_title ">{{item.title}}</label>
<label class="task_award ">
精力
+{{item.rewards}}</label>
<label class="task_award ">
温暖值
+{{item.rewards}}</label>
<block>
<label class="task_progress " a:if="{{item.taskType=='invites'}}">(不限次数)</label>
<
!-- <
label class="task_progress " a:if="{{item.taskType=='invites'}}">(不限次数)</label>
<label class="task_progress " a:elif="{{item.taskType!='follow'}}">({{item.todayCompleteTimes}}/{{item.times}})</label>
<label class="task_progress " a:else>({{item.completeTimes}}/1)</label>
<label class="task_progress " a:else>({{item.completeTimes}}/1)</label>
-->
</block>
</view>
</view>
...
...
taobao_jn/client/components/comunlockstepmodal/comunlockstepmodal.acss
0 → 100644
View file @
133e84b4
.unlockstepmodal {
width: 527rpx;
height: 802rpx;
opacity: 1;
left: 111rpx;
top: 388rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.unlockstepmodal .unlockstepbg {
width: 527rpx;
height: 688rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.unlockstepmodal .unlocksteptext {
width: 366rpx;
height: 586rpx;
opacity: 1;
left: 80rpx;
top: 58rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.unlockstepmodal .unlocksteptext .unlocksteptitle1 {
width: 366rpx;
height: 40rpx;
opacity: 1;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 42rpx;
color: #000000;
}
.unlockstepmodal .unlocksteptext .unlocksteptitle2 {
width: 312rpx;
height: 24rpx;
opacity: 1;
left: 26rpx;
top: 62rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 24rpx;
color: #000000;
text-align: center;
}
.unlockstepmodal .unlocksteptext .unlockstepprizedesc {
width: 245rpx;
height: 20rpx;
opacity: 1;
left: 60rpx;
top: 566rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 20rpx;
color: #000000;
display: none;
}
.unlockstepmodal .unlocksteptext .unlockstepname {
width: 218rpx;
height: 35rpx;
opacity: 1;
left: 72rpx;
top: 397rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 36rpx;
color: #000000;
text-align: center;
}
.unlockstepmodal .unlockstepbtn {
width: 363rpx;
height: 73rpx;
opacity: 1;
left: 82rpx;
top: 534rpx;
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.unlockstepmodal .unlockstepclose {
width: 72rpx;
height: 72rpx;
opacity: 1;
left: 227rpx;
top: 730rpx;
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.unlockstepmodal .unlockstepprizeimg {
width: 262rpx;
height: 262rpx;
opacity: 1;
display: block;
left: 134rpx;
top: 180rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
taobao_jn/client/components/comunlockstepmodal/comunlockstepmodal.axml
0 → 100644
View file @
133e84b4
<view class="unlockstepmodal ">
<image class="unlockstepbg " src={{resList['cae8e0bb-e05f-4bc7-b77d-24b9f1e9492c'].url}} />
<view class="unlocksteptext ">
<label class="unlocksteptitle1 ">{{title1}}</label>
<label class="unlocksteptitle2 ">{{title2}}</label>
<label class="unlockstepprizedesc ">奖品可在 我的奖品 中查看</label>
<label class="unlockstepname ">人气商品</label>
</view>
<image class="unlockstepbtn btn" onTap="redirectToIndex" src={{resList['3078345c-9a38-4d1f-9361-eb7a2587d99e'].url}} />
<image class="unlockstepclose btn" onTap="redirectToIndex" src={{resList['90b5f539-4c56-4210-937e-8dd359fbb2b0'].url}} />
<image class="unlockstepprizeimg " onTap="navigateToGoodsDetail" src={{resList['a37987f0-dcaf-4538-be27-90ebd6e21156-'+unLockStep].url}} />
</view>
\ No newline at end of file
taobao_jn/client/components/comunlockstepmodal/comunlockstepmodal.js
0 → 100644
View file @
133e84b4
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
navigateToOutside
,
}
=
tbcc
.
tb
;
Component
({
props
:
{
unLockStep
:
2
},
data
:
{
resList
:
resList
,
unLockStep
:
0
,
title1
:
''
,
title2
:
''
},
methods
:
{
redirectToIndex
(){
my
.
redirectTo
({
url
:
'/pages/pagepageindex/pagepageindex'
})
},
navigateToGoodsDetail
(){
const
unLockStep
=
this
.
props
.
unLockStep
;
let
url
=
unLockStep
==
2
?
'https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687dPr2HpU&id=625400191293'
:
'https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687dPr2HpU&id=627409975355'
navigateToOutside
(
url
)
}
},
didMount
(){
const
unLockStep
=
this
.
props
.
unLockStep
;
let
str
=
unLockStep
==
2
?
'恭喜您解锁5系赛段'
:
'恭喜您解锁7系赛段'
;
let
str1
=
unLockStep
==
3
?
'进入三人场'
:
'进入四人场'
;
this
.
setData
({
unLockStep
:
unLockStep
,
title1
:
str
,
title2
:
str1
})
}
});
\ No newline at end of file
taobao_jn/client/components/comunlockstepmodal/comunlockstepmodal.json
0 → 100644
View file @
133e84b4
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
taobao_jn/client/components/goodsModal/goodsModal.axml
View file @
133e84b4
...
...
@@ -12,13 +12,13 @@
<view class="goods-modal-container__content-item__name" style="{{{'color':task.color}}}">{{item.name}}</view>
<view class="goods-modal-container__content-item__price">
<view class="goods-modal-container__content-item__price-num"><text>¥</text>{{item.price}}</view>
<
view a:if="{{task.taskType == 'collectGoods
'}}"
<
!-- <view a:if="{{task.taskType == 'collectGoods1
'}}"
data-item="{{item}}"
onTap="goToCollectGoods"
class="{{item.collected ? 'goods-modal-container__content-item__price-collect' : 'goods-modal-container__content-item__price-no-collect'}}"
>
<image mode="scaleToFill" src="{{item.collected?task.image.collect:task.image.no_collect}}"/>
</view>
</view>
-->
</view>
</view>
</view>
...
...
@@ -26,5 +26,5 @@
</view>
<!-- 倒计时 -->
<count-down-modal a:if="{{isShowCountdown && task.taskType == 'browseGoods'}}" percent="{{percent}}" usePercent="{{usePercent}}" styleType="{{'01'}}" />
<count-down-modal a:if="{{isShowCountdown && task.taskType == 'browseGoods'}}"
style="{{{'z-index':999}}}"
percent="{{percent}}" usePercent="{{usePercent}}" styleType="{{'01'}}" />
</view>
\ No newline at end of file
taobao_jn/client/components/goodsModal/goodsModal.js
View file @
133e84b4
...
...
@@ -2,101 +2,132 @@
* 任务类型(taskType):collectGoods、orderGoods、browseGoods、exchangeCredits
*/
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
}
=
tbcc
.
tb
;
const
{
tbcc
}
=
app
;
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
}
=
tbcc
.
tb
;
Component
({
mixins
:
[],
timer
:
null
,
data
:
{
usePercent
:
0
,
// 已进行的进度条
percent
:
0
,
// 进度条
isShowCountdown
:
true
,
// 是否显示倒计时
isFlag
:
1
},
props
:
{
isBackFlag
:
0
,
goodsList
:
[
1
,
2
,
3
],
task
:
{
itemId
:
'617724147979,617724563528,617300295119,614139753189'
,
taskType
:
'browseGoods'
,
type
:
'02'
,
bannerHeight
:
430
,
image
:
{
bg
:
'//yun.dui88.com/taobaomini/clientCTest/goods_bg@2x.png'
,
banner
:
'//yun.dui88.com/taobaomini/clientCTest/goods_banner@2x.png'
,
title
:
'//yun.dui88.com/taobaomini/clientCTest/goods_title@2x.png'
,
collect
:
'//yun.dui88.com/taobaomini/clientCTest/goods_collection@2x.png'
,
no_collect
:
'//yun.dui88.com/taobaomini/clientCTest/collection_no_collect@2x.png'
,
img
:
'//yun.dui88.com/taobaomini/clientCTest/goods_img@2x.png'
,
},
color
:
'#181818'
collectGoods
:
[],
notCollectGoods
:
[],
mixins
:
[],
timer
:
null
,
data
:
{
usePercent
:
0
,
// 已进行的进度条
percent
:
0
,
// 进度条
isShowCountdown
:
true
,
// 是否显示倒计时
isFlag
:
1
},
onCompleteTask
:
()
=>
{}
},
didMount
()
{
const
{
taskType
}
=
this
.
props
.
task
this
.
setData
({
isFlag
:
this
.
props
.
isBackFlag
})
console
.
log
(
this
.
props
.
goodsList
)
if
(
taskType
==
'browseGoods'
)
{
this
.
browseGoodsTimes
()
}
},
didUpdate
(
prevProps
,
prevData
)
{
if
(
prevData
.
isFlag
&&
prevProps
.
isBackFlag
!=
prevData
.
isFlag
)
{
console
.
log
(
3
)
if
(
!
this
.
timer
)
{
this
.
setData
({
usePercent
:
this
.
data
.
percent
})
this
.
browseGoodsTimes
()
console
.
log
(
10
-
this
.
usePercent
)
}
}
},
didUnmount
()
{
clearTimeout
(
this
.
timer
)
},
methods
:
{
/**
* 跳转商品详情页
*/
async
goToGoodsDetail
(
e
)
{
clearInterval
(
this
.
timer
)
this
.
setData
({
percent
:
this
.
data
.
usePercent
,
})
const
{
itemId
}
=
e
.
target
.
dataset
.
item
await
openDetail
(
String
(
itemId
))
},
/**
* 收藏商品
*/
async
goToCollectGoods
(
e
)
{
const
{
itemId
,
collected
}
=
e
.
target
.
dataset
.
item
const
{
taskType
}
=
this
.
props
.
task
if
(
collected
)
return
;
let
result
=
await
collectGoods
(
itemId
)
if
(
result
)
{
this
.
props
.
onCompleteTask
(
taskType
,
itemId
)
}
props
:
{
isBackFlag
:
0
,
goodsList
:
[
1
,
2
,
3
],
task
:
{
// itemId: '617724147979,617724563528,617300295119,614139753189',
// taskType: 'collectGoods',
// type: '02',
// bannerHeight: 430,
// image: {
// bg: '//yun.dui88.com/taobaomini/clientCTest/goods_bg@2x.png',
// banner: '//yun.dui88.com/taobaomini/clientCTest/goods_banner@2x.png',
// title: '//yun.dui88.com/taobaomini/clientCTest/goods_title@2x.png',
// collect: '//yun.dui88.com/taobaomini/clientCTest/goods_collection@2x.png',
// no_collect: '//yun.dui88.com/taobaomini/clientCTest/collection_no_collect@2x.png',
// img: '//yun.dui88.com/taobaomini/clientCTest/goods_img@2x.png',
// },
// color: '#181818'
},
onCompleteTask
:
()
=>
{}
},
/**
* 浏览商品倒计时
*/
browseGoodsTimes
()
{
const
{
taskType
}
=
this
.
props
.
task
this
.
timer
=
setInterval
(()
=>
{
didMount
()
{
const
{
taskType
}
=
this
.
props
.
task
this
.
setData
({
usePercent
:
this
.
data
.
usePercent
+
1
},
()
=>
{
if
(
this
.
data
.
usePercent
>=
10
)
{
console
.
log
(
this
.
data
.
usePercent
)
this
.
props
.
onCompleteTask
(
taskType
)
clearInterval
(
this
.
timer
)
}
isFlag
:
this
.
props
.
isBackFlag
})
},
1000
)
}
},
});
// console.log(this.props.goodsList)
if
(
taskType
==
'browseGoods'
)
{
this
.
browseGoodsTimes
()
}
},
didUpdate
(
prevProps
,
prevData
)
{
const
{
taskType
}
=
this
.
props
.
task
if
(
prevData
.
isFlag
&&
prevProps
.
isBackFlag
!=
prevData
.
isFlag
)
{
console
.
log
(
3
)
if
(
!
this
.
timer
)
{
this
.
setData
({
usePercent
:
this
.
data
.
percent
})
if
(
taskType
==
'browseGoods'
)
{
this
.
browseGoodsTimes
()
}
console
.
log
(
10
-
this
.
usePercent
)
}
}
},
didUnmount
()
{
clearTimeout
(
this
.
timer
)
},
methods
:
{
/**
* 跳转商品详情页
*/
async
goToGoodsDetail
(
e
)
{
clearInterval
(
this
.
timer
)
this
.
setData
({
percent
:
this
.
data
.
usePercent
,
})
const
{
itemId
}
=
e
.
target
.
dataset
.
item
const
{
onSetNotColletArr
}
=
this
.
props
;
onSetNotColletArr
&&
await
onSetNotColletArr
(
itemId
)
await
openDetail
(
String
(
itemId
))
},
/**
* 收藏商品
*/
async
goToCollectGoods
(
e
)
{
const
{
itemId
,
collected
}
=
e
.
target
.
dataset
.
item
const
{
taskType
}
=
this
.
props
.
task
if
(
collected
)
return
;
let
result
=
await
collectGoods
(
itemId
)
if
(
result
)
{
this
.
props
.
onCompleteTask
(
taskType
,
itemId
)
}
},
/**
* 浏览商品倒计时
*/
browseGoodsTimes
()
{
const
{
taskType
}
=
this
.
props
.
task
this
.
timer
=
setInterval
(()
=>
{
this
.
setData
({
usePercent
:
this
.
data
.
usePercent
+
1
},
()
=>
{
if
(
this
.
data
.
usePercent
>=
10
)
{
console
.
log
(
this
.
data
.
usePercent
)
this
.
props
.
onCompleteTask
(
taskType
)
clearInterval
(
this
.
timer
)
}
})
},
1000
)
}
},
});
\ No newline at end of file
taobao_jn/client/pages/goodsPage/goodsPage.axml
View file @
133e84b4
...
...
@@ -3,5 +3,7 @@
isBackFlag="{{isBackFlag}}"
goodsList="{{goodsList}}"
task="{{task}}"
onSetNotColletArr="setNotColletArr"
onSetColletArr="setColletArr"
onCompleteTask="onCompleteTask" />
</view>
\ No newline at end of file
taobao_jn/client/pages/goodsPage/goodsPage.js
View file @
133e84b4
/**
* 任务类型(taskType):collectGoods、orderGoods、browseGoods、exchangeCredits
* task: {
* itemId: //商品ID
* taskType: //任务类型
* type: //头部样式(02——banner,01——标题)
* image: {//图片
* bg: //集合页背景
* banner: //头部banner
* title: //头部title
* collect: //商品以收藏
* no_collect: //商品未收藏
* }
* color: //商品名称:文字颜色
* }
* 任务类型(taskType):collectGoods、orderGoods、browseGoods、exchangeCredits
* task: {
* itemId: //商品ID
* taskType: //任务类型
* type: //头部样式(02——banner,01——标题)
* image: {//图片
* bg: //集合页背景
* banner: //头部banner
* title: //头部title
* collect: //商品以收藏
* no_collect: //商品未收藏
* }
* color: //商品名称:文字颜色
* }
*/
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
,
commonToast
}
=
tbcc
.
tb
;
const
{
tbcc
}
=
app
;
const
{
openDetail
,
collectGoods
,
checkGoodsCollectedStatus
,
commonToast
}
=
tbcc
.
tb
;
import
API
from
'../../api'
;
Page
({
data
:
{
query
:
{},
task
:
{},
isBackFlag
:
1
,
goodsList
:
[]
},
onLoad
(
query
)
{
this
.
query
=
query
||
{}
this
.
init
()
},
onShow
()
{
//重新回到页面开启倒计时
this
.
setData
({
isBackFlag
:
Math
.
floor
((
Math
.
random
()
*
100
))
==
this
.
data
.
isBackFlag
?
101
:
Math
.
floor
((
Math
.
random
()
*
100
))
})
},
init
()
{
const
{
itemId
,
taskType
}
=
this
.
query
this
.
setData
({
task
:
{
itemId
,
taskType
:
'browseGoods'
,
type
:
'01'
,
image
:
{
bg
:
'//yun.dui88.com/taobaomini/clientCTest/goods_bg@2x.png'
,
banner
:
'//yun.dui88.com/taobaomini/clientCTest/goods_banner@2x.png'
,
title
:
'//yun.dui88.com/taobaomini/clientCTest/goods_title@2x.png'
,
collect
:
'//yun.dui88.com/taobaomini/clientCTest/goods_collection@2x.png'
,
no_collect
:
'//yun.dui88.com/taobaomini/clientCTest/collection_no_collect@2x.png'
,
img
:
'//yun.dui88.com/taobaomini/clientCTest/goods_img@2x.png'
,
},
color
:
'#181818'
}
})
this
.
initPage
()
},
async
initPage
()
{
const
{
activityId
}
=
app
const
{
taskType
,
itemIds
}
=
this
.
query
let
goodsList
=
[
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
collected
:
false
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
617724563528
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
false
,
itemId
:
617300295119
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
614139753189
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
},
]
this
.
setData
({
goodsList
})
collectGoodsArr
:
[],
notCollectGoodsArr
:
[],
curItemId
:
0
,
data
:
{
query
:
{},
task
:
{},
isBackFlag
:
1
,
goodsList
:
[]
},
onLoad
(
query
)
{
this
.
query
=
query
||
{}
this
.
init
()
},
onShow
()
{
const
{
itemId
,
taskType
}
=
this
.
query
//重新回到页面开启倒计时
this
.
setData
({
isBackFlag
:
Math
.
floor
((
Math
.
random
()
*
100
))
==
this
.
data
.
isBackFlag
?
101
:
Math
.
floor
((
Math
.
random
()
*
100
))
})
if
(
taskType
==
'collectGoods'
){
this
.
isCanCompleteCollectTask
();
}
},
init
()
{
const
{
itemId
,
taskType
}
=
this
.
query
this
.
setData
({
task
:
{
itemId
,
taskType
:
taskType
,
type
:
'01'
,
image
:
{
bg
:
'//yun.dui88.com/taobaomini/clientCTest/goods_bg@2x.png'
,
banner
:
'//yun.dui88.com/taobaomini/clientCTest/goods_banner@2x.png'
,
title
:
'//yun.dui88.com/taobaomini/clientCTest/goods_title@2x.png'
,
collect
:
'//yun.dui88.com/taobaomini/clientCTest/goods_collection@2x.png'
,
no_collect
:
'//yun.dui88.com/taobaomini/clientCTest/collection_no_collect@2x.png'
,
img
:
'//yun.dui88.com/taobaomini/clientCTest/goods_img@2x.png'
,
},
color
:
'#181818'
}
})
this
.
initPage
()
},
async
initPage
()
{
const
{
activityId
}
=
app
const
{
taskType
,
itemIds
}
=
this
.
query
let
goodsList
=
[{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
collected
:
false
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
617724563528
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
false
,
itemId
:
617300295119
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
614139753189
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
},
]
let
handel
=
taskType
==
'collectGoods'
?
'getCollectItemList'
:
'getItemListByItemIds'
const
{
success
,
data
}
=
await
API
[
handel
]({
activityId
,
itemIds
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
}
},
//任务完成
async
onCompleteTask
(
taskType
,
itemId
)
{
console
.
log
(
taskType
,
itemId
)
const
{
activityId
}
=
app
switch
(
taskType
)
{
case
'collectGoods'
:
let
{
success
,
data
}
=
await
API
.
doCollectGoodsTask
({
activityId
,
taskType
,
itemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
// this.setData({
// goodsList
// })
console
.
log
(
"aaaaaaaaa"
,
taskType
)
let
handel
=
taskType
==
'collectGoods'
?
'getCollectGoodsList'
:
'getItemListByItemIds'
const
{
success
,
data
}
=
await
API
[
handel
]({
itemIds
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
if
(
success
)
{
this
.
initPage
()
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
}
break
;
case
'browseGoods'
:
let
browsResult
=
await
API
.
doCollectGoodsTask
({
activityId
,
taskType
,
itemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
console
.
log
(
browsResult
)
if
(
browsResult
.
success
)
{
commonToast
(
'任务完成,请到任务中心查看奖励'
)
if
(
taskType
==
'collectGoods'
){
this
.
isCanCompleteCollectTask
();
}
},
/**判断收藏商品任务是否完成 */
async
isCanCompleteCollectTask
(
itemId
)
{
// let result = await checkGoodsCollectedStatus(itemId);
// if(!result){
// this.curItemId = itemId;
// this.notCollectGoodsArr.push(itemId);
// }
console
.
log
(
"判断收藏任务是否完成"
)
console
.
log
(
this
.
data
.
goodsList
)
const
list
=
this
.
data
.
goodsList
;
let
num
=
0
;
for
(
let
i
=
0
;
i
<
list
;
i
++
)
{
if
(
list
[
i
].
collected
){
num
++
;
if
(
num
>=
3
){
this
.
onCompleteTask
(
"collectGoods"
)
}
}
}
},
//任务完成
async
onCompleteTask
(
taskType
,
itemId
)
{
console
.
log
(
taskType
,
itemId
)
const
{
activityId
}
=
app
switch
(
taskType
)
{
case
'collectGoods'
:
let
{
success
,
data
}
=
await
API
.
doCollectGoodsTask
({
taskType
,
itemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
if
(
success
)
{
this
.
initPage
()
}
break
;
case
'browseGoods'
:
let
browsResult
=
await
API
.
doBrowseGoodsTask
({
taskType
,
itemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
console
.
log
(
browsResult
)
if
(
browsResult
.
success
)
{
commonToast
(
'任务完成,请到任务中心查看奖励'
)
}
break
;
}
break
;
}
}
});
});
\ No newline at end of file
taobao_jn/client/pages/pagegamemain/pagegamemain.json
View file @
133e84b4
...
...
@@ -3,6 +3,7 @@
"pkprize-modal"
:
"/components/compkprizemodal/compkprizemodal"
,
"pknoprize-modal"
:
"/components/compknoprizemodal/compknoprizemodal"
,
"pkfailnoprize-modal"
:
"/components/compkfailnoprizemodal/compkfailnoprizemodal"
,
"pksuccessnoprize-modal"
:
"/components/compksuccessnoprizemodal/compksuccessnoprizemodal"
"pksuccessnoprize-modal"
:
"/components/compksuccessnoprizemodal/compksuccessnoprizemodal"
,
"task-modal"
:
"/components/comtask/comtask"
}
}
\ No newline at end of file
taobao_jn/client/pages/pagepageindex/pagepageindex.acss
View file @
133e84b4
.canvas {
width:100%;
height:100%;
z-index: 99
9
;
z-index: 99;
pointer-events: none;
}
.page-game {
...
...
taobao_jn/client/pages/pagepageindex/pagepageindex.axml
View file @
133e84b4
...
...
@@ -13,10 +13,10 @@
<image class="pkbtn " src={{resList['bf922d14-54e9-41d2-8c47-281963554715'].url}} />
<image class="assisdebtn btn" onTap="openModal" data-item="inviteList" src={{resList['3ed92e80-21fa-4557-aaf1-92519d445f97'].url}} />
<
image class="unlockbtn2 " a:if="{{curGameStep<2}}" src={{resList['b167ddb3-23b8-4290-ba90-196bbe63daba'].url}} /
>
<
!-- <image class="unlockbtn2 " a:if="{{curGameStep<2}}" src={{resList['b167ddb3-23b8-4290-ba90-196bbe63daba'].url}} /> --
>
<image class="lockbtn2 " a:if="{{curGameStep<2}}" src={{resList['62f291e9-e8c8-40f8-9d4d-a0445f085fdc'].url}} />
<
image class="unlockbtn3 " a:if="{{curGameStep<3}}" src={{resList['b167ddb3-23b8-4290-ba90-196bbe63daba'].url}} /
>
<
!-- <image class="unlockbtn3 " a:if="{{curGameStep<3}}" src={{resList['b167ddb3-23b8-4290-ba90-196bbe63daba'].url}} /> --
>
<image class="lockbtn3 " a:if="{{curGameStep<3}}" src={{resList['62f291e9-e8c8-40f8-9d4d-a0445f085fdc'].url}} />
<view class="wen_zi2 ">
...
...
@@ -29,15 +29,22 @@
<image class="rankbtn btn" onTap="navigateTo" data-item="pagepagerank" src={{resList['c57b33fc-8a26-4f7c-9a62-d0d16cae3406'].url}} />
<image class="rule btn" onTap="openModal" data-item="rule" src={{resList['8bc27234-3326-4564-9697-31beca682da8'].url}} />
<image class="myprize btn" onTap="navigateTo" data-item="myprize" src={{resList['49f550d3-50eb-492a-9fe3-79014e2c42a4'].url}} />
</view>
</view>
<view disable-scroll="true" class="page-game">
<canvas disable-scroll="true" id="canvas" class="canvas" onReady="canvasOnReady">
</canvas>
</view>
</view>
<view class="popcontainer" a:if="{{modalStatus}}">
<rule-modal a:if="{{modalStatus==1}}" onCloseModal="closeModal"></rule-modal>
</view>
<view class="popcontainer_down" a:if="{{modalStatus==2}}">
<invitelist-modal a:if="{{modalStatus==2}}" onCloseModal="closeModal"></invitelist-modal>
</view>
<view class="popcontainer" >
<lockstep-modal onCloseModal="closeModal"></lockstep-modal>
</view>
taobao_jn/client/pages/pagepageindex/pagepageindex.js
View file @
133e84b4
...
...
@@ -136,14 +136,15 @@ Page({
}
=
userInfo
;
app
.
nickName
=
nickName
;
app
.
avatar
=
avatar
;
this
.
judgeDoHelp
();
//
this.login();
//
this.judgeDoHelp();
this
.
login
();
}
},
/**
* 登录接口
*/
async
login
()
{
my
.
showLoading
();
const
{
nickName
,
avatar
...
...
@@ -154,10 +155,12 @@ Page({
userNick
:
nickName
,
avatar
}).
catch
(
res
=>
{
my
.
hideLoading
();
commonToast
(
res
&&
res
.
message
);
})
||
{};
if
(
success
)
{
my
.
hideLoading
();
this
.
getActivityBaseInfoById
();
}
},
...
...
@@ -182,10 +185,6 @@ Page({
},
/**判断是否是助力 */
judgeDoHelp
()
{
setInterval
(()
=>
{
},
undefined
);
console
.
log
(
"aaa"
);
this
.
updateGameInfo
();
},
...
...
taobao_jn/client/pages/pagepageindex/pagepageindex.json
View file @
133e84b4
{
"usingComponents"
:
{
"rule-modal"
:
"/components/comrulemodal/comrulemodal"
,
"invitelist-modal"
:
"/components/cominvitelistmodal/cominvitelistmodal"
"invitelist-modal"
:
"/components/cominvitelistmodal/cominvitelistmodal"
,
"lockstep-modal"
:
"/components/comunlockstepmodal/comunlockstepmodal"
}
}
\ No newline at end of file
taobao_jn/client/pages/pagepagerank/pagepagerank.acss
View file @
133e84b4
...
...
@@ -23,7 +23,7 @@
left: 81rpx;
top: 1236rpx;
position: absolute;
transform-origin:
0rpx 0rpx
0rpx;
transform-origin:
50% 50%
0rpx;
}
.pagerank .ranktex {
width: 596rpx;
...
...
taobao_jn/client/pages/pagepagerank/pagepagerank.axml
View file @
133e84b4
<view class="pagerank ">
<image class="rankbg " src={{resList['eb407995-cc98-4846-bf45-d7ac37e9037e'].url}} />
<image class="rankreturnbtn " src={{resList['071da23d-ca97-4979-91d1-533fe386eef7'].url}} />
<image class="rankreturnbtn
btn" onTap="navigateToIndex
" src={{resList['071da23d-ca97-4979-91d1-533fe386eef7'].url}} />
<view class="ranktex ">
<view class="myrank ">
<label class="rankid ">{{myRankInfo.userNick}}</label>
...
...
@@ -22,7 +22,7 @@
<view class="ranktit2 ">
<label class="ranktit4 ">抱团取暖冲榜赢大奖</label>
<label class="ranktit3 ">赢取清空购物车终极大奖</label>
<label class="ranktim ">
活动时间:2020.10.01-2020.11.11
</label>
<label class="ranktim ">
{{activtyTime}}
</label>
</view>
</view>
</view>
\ No newline at end of file
taobao_jn/client/pages/pagepagerank/pagepagerank.js
View file @
133e84b4
...
...
@@ -13,34 +13,69 @@ const {
getSystemInfo
}
=
tbcc
.
tb
;
Page
({
data
:
{
rankList
:[],
myRankInfo
:{},
myRank
:
''
},
data
:
{
rankList
:
[],
myRankInfo
:
{},
myRank
:
''
,
activtyTime
:
''
},
onLoad
(
props
)
{
this
.
setData
({
resList
:
resList
});
my
.
showLoading
();
this
.
getRankList
();
},
onLoad
(
props
)
{
this
.
setData
({
resList
:
resList
});
my
.
showLoading
();
this
.
getActivtyTime
();
this
.
getRankList
();
},
/**获取排行榜 */
async
getRankList
()
{
const
{
success
,
data
}
=
await
API
.
getUserRankList
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
success
)
{
my
.
hideLoading
();
let
myrank
=
data
.
myRankInfo
.
rank
>=
500
?
'500+'
:
data
.
myRankInfo
.
rank
;
this
.
setData
({
rankList
:
data
.
list
,
myRankInfo
:
data
.
myRankInfo
,
myRank
:
myrank
})
}
},
async
getRankList
(){
const
{
success
,
data
}
=
await
API
.
getUserRankList
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
success
){
my
.
hideLoading
(
);
let
myrank
=
data
.
myRankInfo
.
rank
>=
500
?
'500+'
:
data
.
myRankInfo
.
rank
;
/**获取活动时间 */
getActivtyTime
()
{
const
{
startTime
,
endTime
}
=
app
.
activityInfo
;
let
startStr
=
this
.
getTime1
(
startTime
);
let
endStr
=
this
.
getTime1
(
endTime
)
;
this
.
setData
({
rankList
:
data
.
list
,
myRankInfo
:
data
.
myRankInfo
,
myRank
:
myrank
activtyTime
:
'活动时间:'
+
startStr
+
'-'
+
endStr
})
},
// 转换时间
getTime1
(
time
)
{
const
yy
=
new
Date
(
time
).
getFullYear
();
const
mm
=
new
Date
(
time
).
getMonth
()
+
1
+
''
;
const
dd
=
new
Date
(
time
).
getDate
()
+
''
;
let
m
=
mm
.
padStart
(
2
,
'0'
);
let
d
=
dd
.
padStart
(
2
,
'0'
);
const
t1
=
`
${
yy
}
.
${
m
}
.
${
d
}
`
;
let
date
=
t1
;
return
date
;
},
navigateToIndex
()
{
my
.
navigateBack
();
}
}
});
\ No newline at end of file
taobao_jn/client/resconfig/resList.js
View file @
133e84b4
...
...
@@ -491,6 +491,49 @@ const resList = {
ext
:
'.png'
,
uuid
:
'78ed2fc7-6125-47e5-8120-15fd90f36c0d'
,
url
:
'//yun.duiba.com.cn/spark/assets/e5d745b7b64877323cbe22be1c9e0f7ef00f145c.png'
}
},
'9c4565f2-d6f8-4a33-9cea-c04c5f3cd7a1'
:
{
name
:
'tastDisableBtn'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/tastDisableBtn.cf49568e24ad82bd76ea6e34cb0fcd2809c5102d.png'
,
uuid
:
'9c4565f2-d6f8-4a33-9cea-c04c5f3cd7a1'
},
'a37987f0-dcaf-4538-be27-90ebd6e21156-2'
:
{
name
:
'battle5Prize'
,
ext
:
'.jpg'
,
url
:
'//yun.duiba.com.cn/spark/assets/battle5Prize.41a119c76c81b8bd6573fa896ea97f93012d1152.jpg'
,
uuid
:
'a37987f0-dcaf-4538-be27-90ebd6e21156-2'
},
'a37987f0-dcaf-4538-be27-90ebd6e21156-3'
:
{
name
:
'battle7Prize'
,
ext
:
'.jpg'
,
url
:
'//yun.duiba.com.cn/spark/assets/battle7Prize.3dee8d1b75ebb1123be947ce899baa089b00d18f.jpg'
,
uuid
:
'a37987f0-dcaf-4538-be27-90ebd6e21156-3'
},
'e41300b7-bee4-4224-9f12-7a8513ce8fe9'
:
{
name
:
'tempItem'
,
ext
:
'.jpg'
,
url
:
'//yun.duiba.com.cn/spark/assets/tempItem.bbfdc4aba5cb3e614da1c2cc07af0b64973c94f8.jpg'
,
uuid
:
'e41300b7-bee4-4224-9f12-7a8513ce8fe9'
},
'cae8e0bb-e05f-4bc7-b77d-24b9f1e9492c'
:
{
name
:
'unlockstepBg'
,
ext
:
'.png'
,
uuid
:
'cae8e0bb-e05f-4bc7-b77d-24b9f1e9492c'
,
url
:
'//yun.duiba.com.cn/spark/assets/3a99ad2efd6aa7b74eaf584c20115af1918f0992.png'
},
'3078345c-9a38-4d1f-9361-eb7a2587d99e'
:
{
name
:
'unlockstepbtn'
,
ext
:
'.png'
,
uuid
:
'3078345c-9a38-4d1f-9361-eb7a2587d99e'
,
url
:
'//yun.duiba.com.cn/spark/assets/247ca5d4a478f800713a5e46ec59bf9fdaafc09d.png'
},
'90b5f539-4c56-4210-937e-8dd359fbb2b0'
:
{
name
:
'unlockstepclose'
,
ext
:
'.png'
,
uuid
:
'90b5f539-4c56-4210-937e-8dd359fbb2b0'
,
url
:
'//yun.duiba.com.cn/spark/assets/e277525ee0fc79fd8ba839f2787c58dc4c94421b.png'
},
};
export
default
resList
;
\ No newline at end of file
taobao_jn/debug.log
View file @
133e84b4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
taobao_jn/mocks/jn.getActivityBaseInfoById.json
0 → 100644
View file @
133e84b4
{
"success"
:
true
,
"message"
:
"mollit ullamco reprehenderit Lorem"
,
"code"
:
"proident"
,
"data"
:
{
"_id"
:
"aliquip eiusmod incididunt sed in"
,
"itemId"
:
64428322.20401496
,
"createTime"
:
1598358838171
,
"openId"
:
"esse ad"
,
"deleteStatus"
:
-23608916.698887765
,
"rule"
:
"ea tempor"
,
"startTime"
:
1603618015419
,
"updateTime"
:
1615179172515
,
"endTime"
:
1605377741394
,
"title"
:
"aute cillum veniam sint"
,
"awardReceiveExpiredTime"
:
1611557075775
}
}
\ No newline at end of file
taobao_jn/mocks/jn.getCollectGoodsList.json
0 → 100644
View file @
133e84b4
{
"success"
:
true
,
"data"
:
[
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
true
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
true
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
true
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
}
]
}
\ No newline at end of file
taobao_jn/mocks/jn.getItemListByItemIds.json
0 → 100644
View file @
133e84b4
{
"success"
:
true
,
"data"
:
[
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
},
{
"image"
:
""
,
"name"
:
"商品名商品名商品名商品名商品名商品名商品名商品商品"
,
"price"
:
"388"
,
"itemId"
:
617724147979
,
"collected"
:
false
}
]
}
\ No newline at end of file
taobao_jn/mocks/jn.getTaskList.json
0 → 100644
View file @
133e84b4
{
"success"
:
true
,
"code"
:
"nulla laborum"
,
"data"
:
[
{
"taskType"
:
"follow"
,
"title"
:
"关注蕉内店铺"
,
"rewards"
:
2
,
"taskRateType"
:
2
,
"waitReceive"
:
3069919.1181313694
,
"status"
:
3
,
"completeTimes"
:
1
,
"times"
:
"3"
,
"todayCompleteTimes"
:
50139175.796117544
,
"itemIds"
:
"fugiat et magna"
,
"url"
:
"commodo incididunt in sunt"
},
{
"taskType"
:
"sign"
,
"title"
:
"每日登录"
,
"rewards"
:
2
,
"taskRateType"
:
2
,
"waitReceive"
:
-37886750.95893747
,
"status"
:
1
,
"completeTimes"
:
1
,
"times"
:
"3"
,
"todayCompleteTimes"
:
11323128.027142286
,
"itemIds"
:
"tempor sunt consequat consectetur ipsum"
,
"url"
:
"laborum ad ex"
},
{
"taskType"
:
"browseGoods"
,
"title"
:
"浏览指定页面"
,
"rewards"
:
2
,
"taskRateType"
:
2
,
"waitReceive"
:
-5871225.0604195
,
"status"
:
1
,
"completeTimes"
:
1
,
"times"
:
"3"
,
"todayCompleteTimes"
:
-92181455.51032442
,
"itemIds"
:
"ullamco enim ipsum eu"
,
"url"
:
"irure sed"
},
{
"taskType"
:
"collectGoods"
,
"title"
:
"收藏商品"
,
"rewards"
:
2
,
"taskRateType"
:
2
,
"waitReceive"
:
26400312.822579414
,
"status"
:
1
,
"completeTimes"
:
3
,
"times"
:
"3"
,
"todayCompleteTimes"
:
76741045.15144086
,
"itemIds"
:
"ullamco"
,
"url"
:
"nisi occaecat aute sit ut"
}
],
"message"
:
"sit tempor anim"
}
\ No newline at end of file
taobao_jn/mocks/jn.login.json
0 → 100644
View file @
133e84b4
{
"code"
:
-94257443.72901161
,
"success"
:
true
,
"data"
:
{
"inviteStep"
:
"veniam nostrud"
,
"openId"
:
"consectetur"
,
"inviteId"
:
"dolor minim adipisicing laboris amet"
}
}
\ No newline at end of file
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