Browse Source

解决助力进度过快问题。

milestone-20250723-众筹
宋杰 3 weeks ago
parent
commit
47de5853a1
  1. 21
      src/views/zhongchou/index.vue

21
src/views/zhongchou/index.vue

@ -200,16 +200,29 @@ async function fetchActivity() {
const currentCount = item.marketCount || 0 // const currentCount = item.marketCount || 0 //
// //
if (currentCount >= totalPeople) {
if (currentCount >= 4200) {
isCompleted.value = true // isCompleted.value = true //
usRemainingTime.value = 0 // 0 usRemainingTime.value = 0 // 0
} else { } else {
isCompleted.value = false isCompleted.value = false
// - 151001
// - 12001001120010001
const initialTime = 15 // 15 const initialTime = 15 // 15
const hundredsCount = Math.floor(currentCount / 100) // 100
const remainingTime = Math.max(0, initialTime - hundredsCount) // 1001
let timeReduction = 0
if (currentCount <= 1200) {
// 12001001
timeReduction = Math.floor(currentCount / 100)
} else {
// 120012
timeReduction = 12
// 120010001
const extraCount = currentCount - 1200
const extraReduction = Math.floor(extraCount / 1000)
timeReduction += extraReduction
}
const remainingTime = Math.max(0, initialTime - timeReduction)
usRemainingTime.value = remainingTime usRemainingTime.value = remainingTime
} }

Loading…
Cancel
Save