From 47de5853a1d1cc0b395311e7ce66bbe0f233d9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Sun, 27 Jul 2025 14:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8A=A9=E5=8A=9B=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E8=BF=87=E5=BF=AB=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/zhongchou/index.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/zhongchou/index.vue b/src/views/zhongchou/index.vue index cd8bca5..e08a19a 100644 --- a/src/views/zhongchou/index.vue +++ b/src/views/zhongchou/index.vue @@ -200,16 +200,29 @@ async function fetchActivity() { const currentCount = item.marketCount || 0 // 当前助力人数 // 判断是否已达到总人数 - if (currentCount >= totalPeople) { + if (currentCount >= 4200) { isCompleted.value = true // 设置完成状态 usRemainingTime.value = 0 // 设置剩余时间为0 } else { isCompleted.value = false - // 计算剩余时间 - 初始15分钟,每满100人减少1分钟 + // 计算剩余时间 - 分段计算,前1200人每100人减1分钟,超过1200人后每1000人减1分钟 const initialTime = 15 // 初始时间15分钟 - const hundredsCount = Math.floor(currentCount / 100) // 计算满100的次数 - const remainingTime = Math.max(0, initialTime - hundredsCount) // 每满100人减少1分钟 + let timeReduction = 0 + + if (currentCount <= 1200) { + // 前1200人:每100人减1分钟 + timeReduction = Math.floor(currentCount / 100) + } else { + // 前1200人已减少12分钟 + timeReduction = 12 + // 超过1200人的部分:每1000人减1分钟 + const extraCount = currentCount - 1200 + const extraReduction = Math.floor(extraCount / 1000) + timeReduction += extraReduction + } + + const remainingTime = Math.max(0, initialTime - timeReduction) usRemainingTime.value = remainingTime }