Commit ff99854f by 陆志强

feat: 修复定时抽奖中奖问题

parent 7104d71d
......@@ -46,7 +46,8 @@ export default {
uin: 'users/uin',
isLogin: 'users/isLogin',
lotteryInfo: 'lottery/lotteryInfo',
isBindPhone: 'users/isBindPhone'
isBindPhone: 'users/isBindPhone',
userInfo: 'users/userInfo',
}),
backUrl() {
return this.$route.query.backUrl || ''
......@@ -71,6 +72,16 @@ export default {
},
mounted() {
this.eventHubInit()
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: {
...mapActions({ updateInfo: 'lottery/updateInfo' }),
......
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