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
4aa927a9
authored
Aug 04, 2022
by
Lays-lzq
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/manual'
parents
adcb3d6c
4aea31a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
18 deletions
+24
-18
components/Lottery/Instant/CountdownBar.vue
+10
-1
pages/index/index.vue
+8
-12
pages/mini/index/index.vue
+5
-5
utils/Dms.js
+1
-0
No files found.
components/Lottery/Instant/CountdownBar.vue
View file @
4aa927a9
<
template
>
<section
v-if=
"'startTime' in lotteryInfo"
class=
"countdown-bar"
>
<div
class=
"countdown-bar__status"
>
<template
v-if=
"+status !== LOTTERY_STATUS.end"
>
<template
v-if=
"startModel === 'manual' && +status !== LOTTERY_STATUS.end"
>
<div
class=
"countdown-bar__text"
>
{{
LOTTERY_STATUS_TXT
[
+
status
].
label
}}
</div>
</
template
>
<
template
v-if=
"+status !== LOTTERY_STATUS.end && startModel !== 'manual'"
>
<div
class=
"countdown-bar__text"
>
{{
LOTTERY_STATUS_TXT
[
+
status
].
actionLabel
}}
倒计时:
</div>
<van-count-down
millisecond
:time=
"time"
>
<template
#
default=
"timeData"
>
...
...
@@ -62,6 +65,9 @@ export default {
status
()
{
return
this
.
lotteryInfo
.
status
},
startModel
()
{
return
this
.
lotteryInfo
.
startModel
},
time
()
{
const
{
lotteryInfo
,
status
}
=
this
const
now
=
new
Date
().
getTime
()
...
...
@@ -73,6 +79,9 @@ export default {
}
return
timeDiff
}
},
mounted
()
{
console
.
log
(
this
.
lotteryInfo
,
this
.
lotteryInfo
.
startModel
)
}
}
</
script
>
...
...
pages/index/index.vue
View file @
4aa927a9
<
template
>
<section
class=
"lottery-box"
>
<component
:is=
"lotteryComponents[+lotteryInfo.type]"
v-if=
"'type' in lotteryInfo && lotteryInfo.type"
></component>
<component
:is=
"lotteryComponents[+lotteryInfo.type]"
v-if=
"'type' in lotteryInfo && lotteryInfo.type"
></component>
<ComplaintsDeal></ComplaintsDeal>
<Loading
v-model=
"isLoading"
class=
"lottery-box__loading"
></Loading>
</section>
...
...
@@ -17,7 +14,6 @@ import UserAgents from '@/utils/UserAgents'
import
CONFIG
from
'@/config'
import
ComplaintsDeal
from
'@/components/Common/ComplaintsDeal'
export
default
{
components
:
{
Loading
:
()
=>
import
(
'@/components/Loading'
),
...
...
@@ -98,7 +94,7 @@ export default {
const
{
id
,
playId
}
=
data
const
{
sessionId
:
currentPlayId
,
id
:
currentId
}
=
this
if
(
+
id
===
+
currentId
&&
+
playId
===
+
currentPlayId
)
{
const
{
status
,
startTime
,
endTime
,
userTimes
}
=
data
const
{
status
,
startTime
,
endTime
}
=
data
// 状态
this
.
updateInfo
({
status
...
...
@@ -108,12 +104,12 @@ export default {
startTime
,
endTime
})
// 剩余抽奖次数
if
(
this
.
isLogin
)
{
this
.
updateInfo
({
userTimes
})
}
//
//
剩余抽奖次数
//
if (this.isLogin) {
//
this.updateInfo({
//
userTimes
//
})
//
}
}
})
}
...
...
pages/mini/index/index.vue
View file @
4aa927a9
...
...
@@ -127,11 +127,11 @@ export default {
endTime
})
// 剩余抽奖次数
if
(
this
.
isLogin
)
{
this
.
updateInfo
({
userTimes
})
}
//
if (this.isLogin) {
//
this.updateInfo({
//
userTimes
//
})
//
}
}
})
// 转跳至登录页
...
...
utils/Dms.js
View file @
4aa927a9
...
...
@@ -52,6 +52,7 @@ class Dms {
// chat接收到的消息
ROP
.
On
(
'publish_data'
,
function
(
str
,
topic
)
{
const
data
=
JSON
.
parse
(
str
)
console
.
log
(
data
);
switch
(
topic
)
{
case
activitiesTopic
:
// 抽奖状态改变
...
...
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