Commit 6ce79545 by 赖慧粮

auto deploy

parents 7d8c6a4f 4a37d315
Pipeline #3984 failed with stage
in 2 minutes 15 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment