From 2be679534bf993e8f46f650f36fef5d612d05447 Mon Sep 17 00:00:00 2001 From: hiyu Date: Wed, 19 Jun 2024 19:18:05 +0700 Subject: [PATCH] fix: text + countdown --- src/components/lottery/LotteryGame.vue | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/components/lottery/LotteryGame.vue b/src/components/lottery/LotteryGame.vue index dd17b8e..6e231fb 100644 --- a/src/components/lottery/LotteryGame.vue +++ b/src/components/lottery/LotteryGame.vue @@ -78,7 +78,8 @@ io.emit("join", id, (data) => { }); io.on("game-info", (data) => { - const { name, session, end } = data; + const { name, session, countdown } = data; + const end = Date.now() + countdown * 1000 Object.assign(gameInfo, { session, end }); countDownTime.restart(end); getGameHistory(); @@ -246,12 +247,11 @@ GameInfo(); >
- {{ - formatResultText1(gameHistory[0]?.result) + + {{ + r }}{{ - formatResultText2(gameHistory[0]?.result) - }} + >
- {{ formatResultText1(item.result) }} {{ formatResultText2(item.result) }} - + {{ r }}