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
adb72aee
Commit
adb72aee
authored
Oct 05, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new code --22
parent
6b9f4a37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
13 deletions
+53
-13
api.js
taobao_mini/client/api.js
+7
-0
comMissionModal.js
...mini/client/components/comMissionModal/comMissionModal.js
+31
-6
turnTablePage.js
taobao_mini/client/pages/turnTablePage/turnTablePage.js
+15
-7
No files found.
taobao_mini/client/api.js
View file @
adb72aee
...
...
@@ -95,6 +95,13 @@ const apiList = {
isShowLoading
:
false
},
// 完成跳转链接 任务
doJumpLinkTask
:
{
handle
:
'doJumpLinkTask'
,
method
:
'get'
,
isShowLoading
:
false
},
// 我的奖品列表
getMyPrizeList
:
{
handle
:
'getMyPrizeList'
,
...
...
taobao_mini/client/components/comMissionModal/comMissionModal.js
View file @
adb72aee
...
...
@@ -17,7 +17,7 @@ const TASK_ENUM = {
"btnText"
:
"去邀请"
},
"browseGoods"
:
{
"title"
:
"浏览指定商品
30
s"
,
"title"
:
"浏览指定商品
15
s"
,
"iconUrl"
:
"//yun.duiba.com.cn/spark/assets/43081f4ee9aed1c4d89d9e0882b2b5210a93ef17.png"
,
"btnText"
:
"去浏览"
},
...
...
@@ -55,6 +55,7 @@ Component({
didMount
()
{
// if (this.props.missionsList.length) this.setData({ missionsList: this.props.missionsList })
this
.
getMissionList
()
// commonToast('testtesttesttest')
},
didUpdate
(
prevProps
,
prevData
)
{
...
...
@@ -143,10 +144,23 @@ Component({
if
(
!
success
)
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
)
}
else
{
console
.
log
(
'%c--------领取成功
\
n'
+
'-----yd.receiveTaskRewards
\
n'
,
ConsoleStyle
,
data
)
console
.
log
(
`%c--------任务类型\n-----
${
ds
.
taskType
}
\n`
,
ConsoleStyle
)
if
(
ds
.
taskType
===
'invites'
)
{
commonToast
(
`已有
${
ds
.
info
.
todayCompleteTimes
}
位还有为你助力,获得次数,乐园门票+
${
Number
(
ds
.
info
.
todayCompleteTimes
)
*
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'follow'
)
{
commonToast
(
`成功关注店铺,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'member'
)
{
commonToast
(
`成功入会,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'browseGoods'
)
{
commonToast
(
`任务完成,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'jumpLink'
)
{
commonToast
(
`任务完成,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'moneyGoods'
)
{
commonToast
(
`成功下单,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
if
(
ds
.
taskType
===
'orderGoods'
)
{
commonToast
(
`任务完成,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
else
{
commonToast
(
'领取成功'
)
commonToast
(
`成功下单,乐园门票+
${
Number
(
ds
.
info
.
rewards
)}
`
)
}
this
.
getMissionList
()
this
.
onRefreshGameInfo
()
...
...
@@ -155,8 +169,8 @@ Component({
.
catch
(
res
=>
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
}
else
if
(
ds
.
status
===
3
)
{
commonToast
(
'该任务您已经完成了哦'
)
this
.
onRefreshGameInfo
()
//
commonToast('该任务您已经完成了哦')
//
this.onRefreshGameInfo()
}
},
...
...
@@ -178,7 +192,18 @@ Component({
// 看直播
gotoJumpLink
(
url
)
{
navigateToOutside
(
url
)
API
.
doJumpLinkTask
({
activityId
:
app
.
activityId
})
.
then
(
res
=>
{
const
{
success
,
message
,
data
}
=
res
if
(
!
success
)
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
)
}
else
{
console
.
log
(
'%c--------完成看直播
\
n'
+
'-----yd.doJumpLinkTask
\
n'
,
ConsoleStyle
,
data
)
navigateToOutside
(
url
)
}
this
.
getMissionList
()
})
.
catch
(
res
=>
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
},
// 完成下单商品
...
...
@@ -196,7 +221,7 @@ Component({
if
(
!
success
)
{
console
.
warn
(
res
);
commonToast
(
res
&&
res
.
message
)
}
else
{
console
.
log
(
'%c--------完成关注店铺
\
n'
+
'-----yd.doFollowTask
\
n'
,
ConsoleStyle
,
data
)
commonToast
(
'完成关注店铺'
)
//
commonToast('完成关注店铺')
this
.
getMissionList
()
}
})
...
...
taobao_mini/client/pages/turnTablePage/turnTablePage.js
View file @
adb72aee
...
...
@@ -98,8 +98,16 @@ Page({
this
.
setData
({
rotateFlag
:
true
})
console
.
log
(
'%cstartDraw run'
,
ConsoleStyle
)
if
(
!
this
.
data
.
leftTimes
>
0
)
{
commonToast
(
'您还没有抽奖次数'
)
setTimeout
(()
=>
{
this
.
setData
({
rotateFlag
:
false
})
},
300
)
// commonToast('您还没有抽奖次数')
this
.
showCommonMoadalT1
({
title
:
'抽奖次数不足'
,
content
:
`快去雅顿乐园\n玩游戏赢抽奖次数吧~`
,
confirmCallback
:
async
()
=>
{
this
.
setData
({
rotateFlag
:
false
})
this
.
closeCommonModalT1
()
},
btnImg
:
resList
[
'8aa6d279-6105-430a-8b5a-2132a983fa8a'
].
url
})
return
}
...
...
@@ -148,7 +156,7 @@ Page({
this
.
timerCount
+=
1
// 开始动画
setTimeout
(()
=>
{
this
.
animateRotation
(
360
*
(
this
.
timerCount
*
2
)
+
rotateDeg
,
1
000
*
(
rotateDeg
/
360
)
+
40
)
this
.
animateRotation
(
360
*
(
this
.
timerCount
*
4
)
+
rotateDeg
,
2
000
*
(
rotateDeg
/
360
)
+
40
)
},
300
)
await
this
.
getGameInfo
()
// 更改 rotateFlag - 弹窗 结果弹窗
...
...
@@ -173,18 +181,18 @@ Page({
}
else
{
this
.
showCommonMoadalT1
({
title
:
'很遗憾'
,
content
:
`
快去雅顿乐园\n玩游戏赢抽奖次数吧
~`
,
content
:
`
奖励与您擦家而过\n再接再厉哦
~`
,
confirmCallback
:
async
()
=>
{
this
.
setData
({
rotateFlag
:
false
})
this
.
closeCommonModalT1
()
},
btnImg
:
resList
[
'
8aa6d279-6105-430a-8b5a-2132a983fa8a
'
].
url
btnImg
:
resList
[
'
fd0d94ef-fe1a-4771-8ba2-ad7aadacafc0
'
].
url
})
}
},
1000
*
(
rotateDeg
/
360
)
+
1000
+
100
)
let
time
=
this
.
data
.
leftTimes
-
1
this
.
setData
({
leftTimes
:
time
})
//
let time = this.data.leftTimes - 1
//
this.setData({ leftTimes: time })
}
else
{
commonToast
(
'网络拥堵,请稍后再试'
)
this
.
setData
({
rotateFlag
:
false
})
...
...
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