Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-lottery
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
50e34d19
authored
Nov 03, 2022
by
Lays-lzq
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/newDraw' into dev
parents
967b69a1
683e8ac6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
23 deletions
+41
-23
components/Lottery/Instant/RecordsPupup.vue
+2
-1
components/Lottery/Timing/JoinButton.vue
+2
-2
components/Lottery/Timing/Main.vue
+1
-1
components/Lottery/Timing/MiniMain.vue
+25
-12
components/Lottery/Timing/Rewards.vue
+4
-4
components/Lottery/Timing/type/LuckyBag.vue
+1
-1
utils/Dms.js
+6
-2
No files found.
components/Lottery/Instant/RecordsPupup.vue
View file @
50e34d19
...
@@ -291,6 +291,7 @@ export default {
...
@@ -291,6 +291,7 @@ export default {
color
:
#ff0024
;
color
:
#ff0024
;
font-size
:
12px
;
font-size
:
12px
;
margin-top
:
10px
;
margin-top
:
10px
;
margin-bottom
:
8px
;
}
}
&
__phone
{
&
__phone
{
color
:
#666
;
color
:
#666
;
...
@@ -370,7 +371,7 @@ export default {
...
@@ -370,7 +371,7 @@ export default {
&
__no-data
{
&
__no-data
{
color
:
#999
;
color
:
#999
;
text-align
:
center
;
text-align
:
center
;
padding-top
:
4
0px
;
padding-top
:
10
0px
;
}
}
}
}
</
style
>
</
style
>
components/Lottery/Timing/JoinButton.vue
View file @
50e34d19
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</
template
>
</
template
>
<
template
v-if=
"isLogin && lotteryInfo.isDraw && !lotteryInfo.isWin"
>
<
template
v-if=
"isLogin && lotteryInfo.isDraw && !lotteryInfo.isWin"
>
<div
class=
"win-result-box"
>
<div
class=
"win-result-box"
>
<button
class=
"join-btn end"
>
很遗憾,您
没有
中奖
</button>
<button
class=
"join-btn end"
>
很遗憾,您
未
中奖
</button>
</div>
</div>
</
template
>
</
template
>
<
template
v-if=
"!isLogin || !lotteryInfo.isDraw"
>
<
template
v-if=
"!isLogin || !lotteryInfo.isDraw"
>
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#db0000
;
color
:
#db0000
;
line-height
:
70px
;
//
line-height
:
70px
;
&.pre
{
&.pre
{
color
:
#ffffff
;
color
:
#ffffff
;
background
:
url(./img/button-dark.png)
no-repeat
top
;
background
:
url(./img/button-dark.png)
no-repeat
top
;
...
...
components/Lottery/Timing/Main.vue
View file @
50e34d19
<
template
>
<
template
>
<div
class=
"main-timing"
>
<div
class=
"main-timing"
>
<LuckyBag
<LuckyBag
v-if=
"lotteryInfo.showType === 6"
v-if=
"lotteryInfo.showType === 6
|| lotteryInfo.showType === 1
"
:is-btn-loading=
"isBtnLoading"
:is-btn-loading=
"isBtnLoading"
:is-show-win=
"isShowWin"
:is-show-win=
"isShowWin"
:is-show-bind-phone=
"isShowBindPhone"
:is-show-bind-phone=
"isShowBindPhone"
...
...
components/Lottery/Timing/MiniMain.vue
View file @
50e34d19
<
template
>
<
template
>
<div
class=
"main-timing"
>
<div
class=
"main-timing"
>
<LuckyBag
<LuckyBag
v-if=
"lotteryInfo.showType === 6"
v-if=
"lotteryInfo.showType === 6
|| lotteryInfo.showType === 1
"
:is-mini=
"true"
:is-mini=
"true"
:is-btn-loading=
"isBtnLoading"
:is-btn-loading=
"isBtnLoading"
:is-show-win=
"isShowWin"
:is-show-win=
"isShowWin"
...
@@ -53,7 +53,8 @@ export default {
...
@@ -53,7 +53,8 @@ export default {
uin
:
'users/uin'
,
uin
:
'users/uin'
,
isLogin
:
'users/isLogin'
,
isLogin
:
'users/isLogin'
,
lotteryInfo
:
'lottery/lotteryInfo'
,
lotteryInfo
:
'lottery/lotteryInfo'
,
isBindPhone
:
'users/isBindPhone'
isBindPhone
:
'users/isBindPhone'
,
userInfo
:
'users/userInfo'
,
}),
}),
backUrl
()
{
backUrl
()
{
return
this
.
$route
.
query
.
backUrl
||
''
return
this
.
$route
.
query
.
backUrl
||
''
...
@@ -66,20 +67,31 @@ export default {
...
@@ -66,20 +67,31 @@ export default {
return
list
return
list
}
}
},
},
watch
:
{
//
watch: {
'lotteryInfo.isWin
'
:
{
// 'lotteryInfo.status
': {
handler
(
v
al
)
{
// handler(newVal, oldV
al) {
if
(
val
)
{
// if (newVal === 2 && oldVal === 2 && this.lotteryInfo.isDraw === 1
) {
this
.
loadWinInfo
()
//
this.loadWinInfo()
}
//
}
},
//
},
deep
:
true
//
deep: true
}
//
}
},
//
},
mounted
()
{
mounted
()
{
this
.
eventHubInit
()
this
.
eventHubInit
()
Bus
.
$emit
(
'initDeal'
,
'#db0000'
,
'#ffdccb'
)
Bus
.
$emit
(
'initDeal'
,
'#db0000'
,
'#ffdccb'
)
// this.loadWinInfo()
// this.loadWinInfo()
// 抽奖结果通知
Bus
.
$on
(
'LotteryResult'
,
data
=>
{
if
(
data
.
userId
===
this
.
userInfo
.
id
&&
data
.
isPrize
===
1
)
{
this
.
updateInfo
({
isWin
:
1
})
}
if
(
this
.
lotteryInfo
.
isDraw
===
1
)
{
this
.
loadWinInfo
()
}
})
},
},
methods
:
{
methods
:
{
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
,
updateInfo
:
'lottery/updateInfo'
}),
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
,
updateInfo
:
'lottery/updateInfo'
}),
...
@@ -170,6 +182,7 @@ export default {
...
@@ -170,6 +182,7 @@ export default {
const
{
code
,
errorCode
,
errorMessage
,
data
}
=
res
const
{
code
,
errorCode
,
errorMessage
,
data
}
=
res
if
(
code
===
200
&&
errorCode
===
0
)
{
if
(
code
===
200
&&
errorCode
===
0
)
{
this
.
winInfo
=
this
.
winInfoTranslator
(
data
)
this
.
winInfo
=
this
.
winInfoTranslator
(
data
)
console
.
log
(
this
.
winInfo
);
this
.
isShowWin
=
true
this
.
isShowWin
=
true
}
else
{
}
else
{
this
.
$toast
(
errorMessage
)
this
.
$toast
(
errorMessage
)
...
...
components/Lottery/Timing/Rewards.vue
View file @
50e34d19
...
@@ -57,10 +57,10 @@ export default {
...
@@ -57,10 +57,10 @@ export default {
justify-content
:
space-around
;
justify-content
:
space-around
;
.intro
{
.intro
{
//
margin-bottom
:
24px
;
//
margin-bottom
:
24px
;
height
:
4
6.5
%
;
height
:
4
0
%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-
around
;
justify-content
:
space-
between
;
&__title
{
&__title
{
font-size
:
16px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-around
;
justify-content
:
space-around
;
margin-top
:
15px
;
//
margin-top
:
15px
;
&-item
{
&-item
{
font-size
:
13px
;
font-size
:
13px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
}
}
}
}
.rule
{
.rule
{
height
:
4
8.5
%
;
height
:
4
4
%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-around
;
justify-content
:
space-around
;
...
...
components/Lottery/Timing/type/LuckyBag.vue
View file @
50e34d19
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
:style=
"
{ bottom: isMini ? '26%' : '51%' }"
:style=
"
{ bottom: isMini ? '26%' : '51%' }"
@lottery="lotteryCallback"
@lottery="lotteryCallback"
>
</JoinButton>
>
</JoinButton>
<Rewards
v-if=
"!isMini"
:style=
"
{ height: isMini ? '65.5vh' : '
37
.5vh' }" class="reward-box">
</Rewards>
<Rewards
v-if=
"!isMini"
:style=
"
{ height: isMini ? '65.5vh' : '
40
.5vh' }" class="reward-box">
</Rewards>
<BackButton
v-if=
"backUrl"
class=
"back-box"
:url=
"backUrl"
></BackButton>
<BackButton
v-if=
"backUrl"
class=
"back-box"
:url=
"backUrl"
></BackButton>
<Records
v-if=
"isMini"
></Records>
<Records
v-if=
"isMini"
></Records>
<RulePopup
:value=
"isShowIntro"
></RulePopup>
<RulePopup
:value=
"isShowIntro"
></RulePopup>
...
...
utils/Dms.js
View file @
50e34d19
...
@@ -64,8 +64,12 @@ class Dms {
...
@@ -64,8 +64,12 @@ class Dms {
Bus
.
$emit
(
'LotteryInfoUpdate'
,
data
)
Bus
.
$emit
(
'LotteryInfoUpdate'
,
data
)
}
}
// 抽奖时间更新
// 抽奖时间更新
if
(
data
.
cmd
===
'draw_time_start'
)
{
// if (data.cmd === 'draw_time_start') {
Bus
.
$emit
(
'LotteryInfoUpdate'
,
data
)
// Bus.$emit('LotteryInfoUpdate', data)
// }
// 中奖结果
if
(
data
.
cmd
===
'draw_result'
)
{
Bus
.
$emit
(
'LotteryResult'
,
data
)
}
}
break
break
default
:
default
:
...
...
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