Commit 93bd3aad by Lays-lzq

Merge branch 'feature/newDraw' into test

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