Commit 4aa927a9 by Lays-lzq

Merge branch 'feature/manual'

parents adcb3d6c 4aea31a5
<template>
<section v-if="'startTime' in lotteryInfo" class="countdown-bar">
<div class="countdown-bar__status">
<template v-if="+status !== LOTTERY_STATUS.end">
<template v-if="startModel === 'manual' && +status !== LOTTERY_STATUS.end">
<div class="countdown-bar__text">{{ LOTTERY_STATUS_TXT[+status].label }}</div>
</template>
<template v-if="+status !== LOTTERY_STATUS.end && startModel !== 'manual'">
<div class="countdown-bar__text">{{ LOTTERY_STATUS_TXT[+status].actionLabel }}倒计时:</div>
<van-count-down millisecond :time="time">
<template #default="timeData">
......@@ -62,6 +65,9 @@ export default {
status() {
return this.lotteryInfo.status
},
startModel() {
return this.lotteryInfo.startModel
},
time() {
const { lotteryInfo, status } = this
const now = new Date().getTime()
......@@ -73,6 +79,9 @@ export default {
}
return timeDiff
}
},
mounted() {
console.log(this.lotteryInfo, this.lotteryInfo.startModel)
}
}
</script>
......
<template>
<section class="lottery-box">
<component
:is="lotteryComponents[+lotteryInfo.type]"
v-if="'type' in lotteryInfo && lotteryInfo.type"
></component>
<component :is="lotteryComponents[+lotteryInfo.type]" v-if="'type' in lotteryInfo && lotteryInfo.type"></component>
<ComplaintsDeal></ComplaintsDeal>
<Loading v-model="isLoading" class="lottery-box__loading"></Loading>
</section>
......@@ -17,7 +14,6 @@ import UserAgents from '@/utils/UserAgents'
import CONFIG from '@/config'
import ComplaintsDeal from '@/components/Common/ComplaintsDeal'
export default {
components: {
Loading: () => import('@/components/Loading'),
......@@ -98,7 +94,7 @@ export default {
const { id, playId } = data
const { sessionId: currentPlayId, id: currentId } = this
if (+id === +currentId && +playId === +currentPlayId) {
const { status, startTime, endTime, userTimes } = data
const { status, startTime, endTime } = data
// 状态
this.updateInfo({
status
......@@ -108,12 +104,12 @@ export default {
startTime,
endTime
})
// 剩余抽奖次数
if (this.isLogin) {
this.updateInfo({
userTimes
})
}
// // 剩余抽奖次数
// if (this.isLogin) {
// this.updateInfo({
// userTimes
// })
// }
}
})
}
......
......@@ -127,11 +127,11 @@ export default {
endTime
})
// 剩余抽奖次数
if (this.isLogin) {
this.updateInfo({
userTimes
})
}
// if (this.isLogin) {
// this.updateInfo({
// userTimes
// })
// }
}
})
// 转跳至登录页
......
......@@ -52,6 +52,7 @@ class Dms {
// chat接收到的消息
ROP.On('publish_data', function (str, topic) {
const data = JSON.parse(str)
console.log(data);
switch (topic) {
case activitiesTopic:
// 抽奖状态改变
......
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