Browse Source

Merge branch 'zhangjiahao/feature-20250717125955-众筹' into milestone-20250723-众筹

milestone-20250723-众筹
zhangjiahao 3 weeks ago
parent
commit
886e194d6c
  1. 39
      src/views/zhongchou/index.vue

39
src/views/zhongchou/index.vue

@ -41,7 +41,7 @@
<!-- 美股剩余时间显示 -->
<div class="stock-info" :class="{ 'time-almost-up': isTimeAlmostUp }">
<h3>美股实时数据</h3>
<h3>{{ marketName }}实时数据</h3>
<h3>还剩{{ numberToChinese(usDisplayTime) }}分钟</h3>
</div>
</div>
@ -170,13 +170,16 @@ async function fetchActivity() {
}
//
if (data && data.length > 0) {
//
data.forEach(item => {
if (item.market === "美股" && item.marketId === 8) {
// ID
if (data && data.length > 1) { //
// 使1
const item = data[0] // 使
// ID
usMarketId.value = item.marketId
//
marketName.value = item.market
// marketStatus
if (item.marketStatus === '已助力') {
usBoostStatus.value = true
@ -197,7 +200,7 @@ async function fetchActivity() {
const remainingTime = Math.max(0, 15 - usedTime)
usRemainingTime.value = Math.round(remainingTime)
console.log(`美股助力人数: ${currentCount}/${totalPeople}, 进度: ${progressPercent.toFixed(1)}%, 剩余时间: ${remainingTime.toFixed(1)}分钟`)
console.log(`${marketName.value}助力人数: ${currentCount}/${totalPeople}, 进度: ${progressPercent.toFixed(1)}%, 剩余时间: ${remainingTime.toFixed(1)}分钟`)
//
nextTick(() => {
@ -205,11 +208,6 @@ async function fetchActivity() {
})
}
}
//
// if (item.market === "" && item.marketId === 5) { ... }
})
}
} else {
console.error('获取活动失败:', response.message)
activityPeriod.value = '获取失败'
@ -261,6 +259,7 @@ const showRulesModal = ref(false)
//
const showBoostSuccess = ref(false)
// - marketTwoCount
const marketName = ref('美股') // API
const usRemainingTime = ref(15) // 15
// const hkRemainingTime = ref(6) //
const usTotalTime = ref(15) // 15
@ -375,7 +374,7 @@ const handleBoostClick = async (area) => {
});
if (response.code === 200) {
console.log('美股助力成功:', response.message)
console.log(`${marketName.value}助力成功:`, response.message)
//
showBoostSuccess.value = true
@ -386,15 +385,14 @@ const handleBoostClick = async (area) => {
//
await fetchActivity()
console.log('美股已助力状态:', usBoostStatus.value, '剩余时间:', usRemainingTime.value)
console.log(`${marketName.value}已助力状态:`, usBoostStatus.value, '剩余时间:', usRemainingTime.value)
} else {
console.error('美股助力失败:', response.message)
console.error(`${marketName.value}助力失败:`, response.message)
}
} catch (error) {
console.error('美股助力请求失败:', error)
console.error(`${marketName.value}助力请求失败:`, error)
}
}
}
const showRulesFunc = () => {
@ -1276,15 +1274,18 @@ const hideRules = () => {
.rules-list {
width: 100%;
line-height: 1.6;
line-height: 1.6; /* 增加行高 */
margin-top: 10%;
margin-left: 10%;
margin-left: 10%; /* 减少左边距 */
padding-right: 5%; /* 添加右边距 */
}
.rules-list p {
margin: 10px 0;
font-size: 16px;
color: #fff;
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; /* 使用更清晰的中文字体 */
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
line-height: 1.7;
}

Loading…
Cancel
Save