Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-vote
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6ce79545
authored
Aug 06, 2021
by
赖慧粮
Browse files
Options
Browse Files
Download
Plain Diff
auto deploy
parents
7d8c6a4f
4a37d315
Pipeline
#3984
failed with stage
in 2 minutes 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
pages/detail/index.vue
+16
-1
No files found.
pages/detail/index.vue
View file @
6ce79545
...
...
@@ -70,7 +70,7 @@ import { getOptionDetail } from '@/api/modules/vote'
import
UserAgents
from
'@/utils/UserAgents'
import
CONFIG
from
'@/config'
import
Bus
from
'@/utils/Bus'
import
Share
from
'@/components/Common/Share'
// import DPlayer from '@/components/Player/DPlayer'
...
...
@@ -110,6 +110,12 @@ export default {
immediate
:
true
}
},
mounted
()
{
this
.
eventHubInit
()
},
destroyed
()
{
Bus
.
$off
(
'VoteNumUpdate'
)
},
methods
:
{
...
mapActions
({
voteIt
:
'vote/voteIt'
}),
dataInit
()
{
...
...
@@ -126,6 +132,15 @@ export default {
}
})
},
eventHubInit
()
{
// 票数增加通知
Bus
.
$on
(
'VoteNumUpdate'
,
data
=>
{
const
{
id
,
optionId
}
=
this
.
$route
.
query
if
(
+
data
.
voteId
===
+
id
&&
+
optionId
===
+
data
.
contentId
)
{
this
.
info
.
vote_num
=
data
.
num
}
})
},
setVote
()
{
const
{
info
}
=
this
const
{
id
}
=
this
.
query
...
...
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