Commit 4aa927a9 by Lays-lzq

Merge branch 'feature/manual'

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