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
4a37d315
authored
Aug 06, 2021
by
赖慧粮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(detail): 详情页接入dms
parent
220b74f4
Pipeline
#3983
failed with stage
in 2 minutes 5 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 @
4a37d315
...
...
@@ -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