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
60cff560
Commit
60cff560
authored
Oct 04, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new code and fixed some bugs --01
parent
c6a25eef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
comMissionModal.js
...mini/client/components/comMissionModal/comMissionModal.js
+1
-1
homePage.js
taobao_mini/client/pages/homePage/homePage.js
+6
-5
turnTablePage.js
taobao_mini/client/pages/turnTablePage/turnTablePage.js
+12
-8
No files found.
taobao_mini/client/components/comMissionModal/comMissionModal.js
View file @
60cff560
...
...
@@ -61,7 +61,7 @@ Component({
// if (this.data.missionsList.length !== prevData.missionsList.length) {
// this.setData({ missionsList: this.props.missionsList })
// }
if
(
this
.
props
.
refresh
)
this
.
getMissionList
()
//
this.getMissionList()
},
methods
:
{
...
...
taobao_mini/client/pages/homePage/homePage.js
View file @
60cff560
...
...
@@ -291,16 +291,17 @@ Page({
.
catch
(
err
=>
{
console
.
log
(
`%c助力失败!!!\n`
+
'-----yd.doHelp
\
n'
,
ConsoleStyle
,
err
)
if
(
err
.
data
.
url
)
{
app
.
vipUrl
=
data
.
url
app
.
vipUrl
=
err
.
data
.
url
this
.
showCommonMoadalT1
({
title
:
'温馨提示'
,
content
:
'成为会员 才能为他助力哦~'
,
confirmCallback
:
()
=>
{
navigateToOutside
(
data
.
url
)
navigateToOutside
(
err
.
data
.
url
)
},
btnImg
:
'//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png'
})
btnImg
:
'//yun.duiba.com.cn/spark/assets/一秒成为会员.10be8a8ede8f6c62eadb005744dc54ae182911d9.png'
})
}
else
{
commonToast
(
err
.
message
+
'.'
)
;
commonToast
(
err
.
message
+
'.'
)
}
});
}
else
{
...
...
@@ -345,7 +346,7 @@ Page({
// 页面显示
onShow
()
{
if
(
this
.
userLogin
)
this
.
getGameInfo
()
this
.
setData
({
missionRefresh
:
true
})
//
this.setData({ missionRefresh: true })
},
// 获取 游戏门票 抽奖次数 今日是否首次登陆
...
...
taobao_mini/client/pages/turnTablePage/turnTablePage.js
View file @
60cff560
...
...
@@ -134,7 +134,7 @@ Page({
this
.
data
.
listTurnTable
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
_id
==
data
.
prizeId
)
{
rotateT
=
index
+
1
rotateT
=
4
+
1
//
rotateT = 4 + 1
this
.
setData
({
rewardsInfo
:
data
})
}
// test code -
...
...
@@ -143,15 +143,14 @@ Page({
})
}
// 调整位置-归零
this
.
animateRotation
(
this
.
timerCount
?
360
*
(
++
this
.
timerCount
*
2
)
:
0
,
20
)
rotateDeg
=
rotateT
*
60
-
30
console
.
log
(
`%c旋转扇面
${
rotateT
}
\n`
+
`%c旋转角度
${
rotateDeg
}
\n`
,
ConsoleStyle
)
this
.
timerCount
+=
1
// 开始动画
setTimeout
(()
=>
{
this
.
animateRotation
(
360
*
(
this
.
timerCount
*
2
)
+
rotateDeg
,
1000
*
(
rotateDeg
/
360
)
+
40
)
},
300
)
await
this
.
getGameInfo
()
// 更改 rotateFlag - 弹窗 结果弹窗
setTimeout
(()
=>
{
if
(
data
.
type
!==
5
)
{
...
...
@@ -160,13 +159,11 @@ Page({
content
:
`恭喜您获得
${
data
.
name
}
`
,
confirmCallback1
:
async
()
=>
{
this
.
setData
({
rotateFlag
:
false
})
await
this
.
getGameInfo
()
this
.
closeCommonModalT2
()
this
.
gotoMyPrize
()
},
confirmCallback2
:
async
()
=>
{
this
.
setData
({
rotateFlag
:
false
})
await
this
.
getGameInfo
()
this
.
closeCommonModalT2
()
},
btnImg1
:
resList
[
'240b56fa-66ce-414c-86ea-4ac13a3ac4e2'
].
url
,
...
...
@@ -179,7 +176,6 @@ Page({
content
:
`奖励与你擦肩而过\n 再接再厉哦~`
,
confirmCallback
:
async
()
=>
{
this
.
setData
({
rotateFlag
:
false
})
await
this
.
getGameInfo
()
this
.
closeCommonModalT1
()
},
btnImg
:
resList
[
'fd0d94ef-fe1a-4771-8ba2-ad7aadacafc0'
].
url
...
...
@@ -196,9 +192,15 @@ Page({
},
// 转盘归零 函数
gotoZero
()
{
// 调整位置-归零
this
.
animateRotation
(
this
.
timerCount
?
360
*
(
++
this
.
timerCount
*
2
)
:
0
,
20
)
},
// 旋转动画rot:旋转角度,timegap:旋转时间
animateRotation
(
rot
,
timegap
)
{
console
.
log
(
'animateRotation run'
,
rot
,
timegap
)
console
.
log
(
'animate
_
Rotation run'
,
rot
,
timegap
)
let
animation
=
my
.
createAnimation
({
transformOrigin
:
'center center'
,
duration
:
timegap
,
...
...
@@ -302,10 +304,12 @@ Page({
// 通用弹层 - 关闭 - T1
closeCommonModalT1
()
{
this
.
setData
({
commonModalVisibleT1
:
false
,
rotateFlag
:
false
});
this
.
gotoZero
()
},
// 通用弹层 - 关闭 - T2
closeCommonModalT2
()
{
this
.
setData
({
commonModalVisibleT2
:
false
,
rotateFlag
:
false
});
this
.
gotoZero
()
},
onModalT2One
()
{
this
.
data
.
onModalT2One
()
},
...
...
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