Commit 50e34d19 by Lays-lzq

Merge branch 'feature/newDraw' into dev

parents 967b69a1 683e8ac6
...@@ -291,6 +291,7 @@ export default { ...@@ -291,6 +291,7 @@ export default {
color: #ff0024; color: #ff0024;
font-size: 12px; font-size: 12px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 8px;
} }
&__phone { &__phone {
color: #666; color: #666;
...@@ -370,7 +371,7 @@ export default { ...@@ -370,7 +371,7 @@ export default {
&__no-data { &__no-data {
color: #999; color: #999;
text-align: center; text-align: center;
padding-top: 40px; padding-top: 100px;
} }
} }
</style> </style>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</template> </template>
<template v-if="isLogin && lotteryInfo.isDraw && !lotteryInfo.isWin"> <template v-if="isLogin && lotteryInfo.isDraw && !lotteryInfo.isWin">
<div class="win-result-box"> <div class="win-result-box">
<button class="join-btn end">很遗憾,您没有中奖</button> <button class="join-btn end">很遗憾,您中奖</button>
</div> </div>
</template> </template>
<template v-if="!isLogin || !lotteryInfo.isDraw"> <template v-if="!isLogin || !lotteryInfo.isDraw">
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #db0000; color: #db0000;
line-height: 70px; // line-height: 70px;
&.pre { &.pre {
color: #ffffff; color: #ffffff;
background: url(./img/button-dark.png) no-repeat top; background: url(./img/button-dark.png) no-repeat top;
......
<template> <template>
<div class="main-timing"> <div class="main-timing">
<LuckyBag <LuckyBag
v-if="lotteryInfo.showType === 6" v-if="lotteryInfo.showType === 6 || lotteryInfo.showType === 1"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
:is-show-bind-phone="isShowBindPhone" :is-show-bind-phone="isShowBindPhone"
......
<template> <template>
<div class="main-timing"> <div class="main-timing">
<LuckyBag <LuckyBag
v-if="lotteryInfo.showType === 6" v-if="lotteryInfo.showType === 6 || lotteryInfo.showType === 1"
:is-mini="true" :is-mini="true"
:is-btn-loading="isBtnLoading" :is-btn-loading="isBtnLoading"
:is-show-win="isShowWin" :is-show-win="isShowWin"
...@@ -53,7 +53,8 @@ export default { ...@@ -53,7 +53,8 @@ export default {
uin: 'users/uin', uin: 'users/uin',
isLogin: 'users/isLogin', isLogin: 'users/isLogin',
lotteryInfo: 'lottery/lotteryInfo', lotteryInfo: 'lottery/lotteryInfo',
isBindPhone: 'users/isBindPhone' isBindPhone: 'users/isBindPhone',
userInfo: 'users/userInfo',
}), }),
backUrl() { backUrl() {
return this.$route.query.backUrl || '' return this.$route.query.backUrl || ''
...@@ -66,20 +67,31 @@ export default { ...@@ -66,20 +67,31 @@ export default {
return list return list
} }
}, },
watch: { // watch: {
'lotteryInfo.isWin': { // 'lotteryInfo.status': {
handler(val) { // handler(newVal, oldVal) {
if (val) { // if (newVal === 2 && oldVal === 2 && this.lotteryInfo.isDraw === 1) {
this.loadWinInfo() // this.loadWinInfo()
} // }
}, // },
deep: true // deep: true
} // }
}, // },
mounted() { mounted() {
this.eventHubInit() this.eventHubInit()
Bus.$emit('initDeal', '#db0000', '#ffdccb') Bus.$emit('initDeal', '#db0000', '#ffdccb')
// this.loadWinInfo() // this.loadWinInfo()
// 抽奖结果通知
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: { methods: {
...mapActions({ jumpToLogin: 'users/jumpToLogin', updateInfo: 'lottery/updateInfo' }), ...mapActions({ jumpToLogin: 'users/jumpToLogin', updateInfo: 'lottery/updateInfo' }),
...@@ -170,6 +182,7 @@ export default { ...@@ -170,6 +182,7 @@ export default {
const { code, errorCode, errorMessage, data } = res const { code, errorCode, errorMessage, data } = res
if (code === 200 && errorCode === 0) { if (code === 200 && errorCode === 0) {
this.winInfo = this.winInfoTranslator(data) this.winInfo = this.winInfoTranslator(data)
console.log(this.winInfo);
this.isShowWin = true this.isShowWin = true
} else { } else {
this.$toast(errorMessage) this.$toast(errorMessage)
......
...@@ -57,10 +57,10 @@ export default { ...@@ -57,10 +57,10 @@ export default {
justify-content: space-around; justify-content: space-around;
.intro { .intro {
// margin-bottom: 24px; // margin-bottom: 24px;
height: 46.5%; height: 40%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-between;
&__title { &__title {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
margin-top: 15px; // margin-top: 15px;
&-item { &-item {
font-size: 13px; font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
} }
} }
.rule { .rule {
height: 48.5%; height: 44%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:style="{ bottom: isMini ? '26%' : '51%' }" :style="{ bottom: isMini ? '26%' : '51%' }"
@lottery="lotteryCallback" @lottery="lotteryCallback"
></JoinButton> ></JoinButton>
<Rewards v-if="!isMini" :style="{ height: isMini ? '65.5vh' : '37.5vh' }" class="reward-box"></Rewards> <Rewards v-if="!isMini" :style="{ height: isMini ? '65.5vh' : '40.5vh' }" class="reward-box"></Rewards>
<BackButton v-if="backUrl" class="back-box" :url="backUrl"></BackButton> <BackButton v-if="backUrl" class="back-box" :url="backUrl"></BackButton>
<Records v-if="isMini"></Records> <Records v-if="isMini"></Records>
<RulePopup :value="isShowIntro"></RulePopup> <RulePopup :value="isShowIntro"></RulePopup>
......
...@@ -64,8 +64,12 @@ class Dms { ...@@ -64,8 +64,12 @@ class Dms {
Bus.$emit('LotteryInfoUpdate', data) Bus.$emit('LotteryInfoUpdate', data)
} }
// 抽奖时间更新 // 抽奖时间更新
if (data.cmd === 'draw_time_start') { // if (data.cmd === 'draw_time_start') {
Bus.$emit('LotteryInfoUpdate', data) // Bus.$emit('LotteryInfoUpdate', data)
// }
// 中奖结果
if (data.cmd === 'draw_result') {
Bus.$emit('LotteryResult', data)
} }
break break
default: default:
......
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