diff --git a/src/views/zhongchou/index.vue b/src/views/zhongchou/index.vue index 27bc6d6..992aa1c 100644 --- a/src/views/zhongchou/index.vue +++ b/src/views/zhongchou/index.vue @@ -175,7 +175,7 @@ async function fetchActivity() { } else { activityPeriod.value = '时间待定' } - + // 处理市场数据 if (data && data.length > 1) { // 确保至少有两个元素 // 使用数组中的第二个元素(索引为1) @@ -199,7 +199,7 @@ async function fetchActivity() { const totalPeople = 1500 // 总人数1500人 const currentCount = item.marketCount || 0 // 当前助力人数 - // 判断是否已达到总人数 + // 判断是否已达到总人数 if (currentCount >= totalPeople) { isCompleted.value = true // 设置完成状态 usRemainingTime.value = 0 // 设置剩余时间为0 @@ -210,7 +210,7 @@ async function fetchActivity() { const initialTime = 15 // 初始时间15分钟 const hundredsCount = Math.floor(currentCount / 100) // 计算满100的次数 const remainingTime = Math.max(0, initialTime - hundredsCount) // 每满100人减少1分钟 - + usRemainingTime.value = remainingTime } @@ -348,10 +348,6 @@ const getQueryVariable = (variable) => { onMounted(() => { showRulesModal.value = true nextTick(() => { - // 页面加载时自动获取活动数据 - fetchActivity() - updateProgressBarHeight() - updateProgressDisplay() let token = ''; token = getQueryVariable('token') localStorage.setItem('localToken', token); @@ -361,6 +357,10 @@ onMounted(() => { updateProgressBarHeight() }) }) + // 页面加载时自动获取活动数据 + fetchActivity() + updateProgressBarHeight() + updateProgressDisplay() }) }) @@ -374,7 +374,7 @@ onMounted(() => { // } const handleBoostClick = async (area) => { - // 如果已完成(达到1500人),则不执行任何操作 + // 如果已完成(达到1500人),则不执行任何操作 if (isCompleted.value) { return; } @@ -861,6 +861,7 @@ const hideRules = () => { pointer-events: none; /* 完全禁用鼠标事件 */ } + /* 修改悬浮效果,排除完成状态的按钮 */ .boost-btn:not(.completed):hover { background-size: 110%; @@ -870,6 +871,7 @@ const hideRules = () => { .boost-btn:hover { /* 移除此样式或注释掉 */ } + /* 港股助力按钮 */ /* .hk-boost-btn { background-image: url('@/assets/img/zhongchou/助力港股.png');