You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1076 lines
28 KiB
1076 lines
28 KiB
<template>
|
|
<div class="interactive-container">
|
|
<!-- 顶部区域 -->
|
|
<div class="top-section">
|
|
<!-- 主标题 -->
|
|
<div class="main-title">
|
|
<img src="@/assets/img/zhongchou/大标题.png" alt="">
|
|
<div class="activity-period">活动时间:2025/07/26~2025/08/05</div>
|
|
</div>
|
|
|
|
<!-- 活动规则按钮 -->
|
|
<div class="rules-btn" @click="showRules">
|
|
<img src="@/assets/img/zhongchou/活动需知.png" alt="活动规则" />
|
|
<span class="rules-text">活动规则</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 主要交互区域 -->
|
|
<div class="main-interactive-area">
|
|
<!-- 左侧美股区域 -->
|
|
<div class="stock-area left-area" @click="handleAreaClick('us')"
|
|
:class="{ active: activeArea === 'us', 'side': activeArea === 'hk' }">
|
|
<div class="stock-content">
|
|
<div class="stock-card us-card">
|
|
<div class="card-content us-content">
|
|
<div class="progress-section">
|
|
<div class="progress-bar">
|
|
<div class="progress-fill"></div>
|
|
</div>
|
|
<!-- 美股区域刻度 -->
|
|
<div class="time-markers">
|
|
<div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
|
|
'reached': (15 - usUsedTime) <= time,
|
|
'gold': (15 - usUsedTime) > time
|
|
}">
|
|
{{ time }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 美股剩余时间显示 -->
|
|
<div class="stock-info">
|
|
<h3>距美股实时数据</h3>
|
|
<h3>还剩{{ numberToChinese(usDisplayTime) }}分钟</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 美股助力按钮和底座 -->
|
|
<div class="boost-section">
|
|
<div class="boost-btn us-boost-btn" :class="{ 'boosted': usBoostStatus }"
|
|
@click.stop="handleBoostClick('us')"></div>
|
|
<div class="base-image">
|
|
<img src="@/assets/img/zhongchou/底座.png" alt="底座" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 中央火箭区域 -->
|
|
<div class="rocket-area" :class="{ hidden: activeArea !== null }">
|
|
<div class="rocket-container">
|
|
<div class="rocket-body">
|
|
<img src="@/assets/img/zhongchou/火箭.png" alt="火箭" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 右侧港股区域 -->
|
|
<div class="stock-area right-area" @click="handleAreaClick('hk')"
|
|
:class="{ active: activeArea === 'hk', 'side': activeArea === 'us' }">
|
|
<div class="stock-content">
|
|
<div class="stock-card hk-card">
|
|
<div class="card-content hk-content">
|
|
<!-- 港股剩余时间显示 -->
|
|
<div class="stock-info">
|
|
<h3>距港股实时数据</h3>
|
|
<h3>还剩{{ numberToChinese(hkDisplayTime) }}分钟</h3>
|
|
</div>
|
|
|
|
<div class="progress-section">
|
|
<div class="progress-bar">
|
|
<div class="progress-fill"></div>
|
|
</div>
|
|
<!-- 港股区域刻度 -->
|
|
<div class="time-markers">
|
|
<div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
|
|
'reached': (15 - hkUsedTime) <= time,
|
|
'gold': (15 - hkUsedTime) > time
|
|
}">
|
|
{{ time }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 港股助力按钮和底座 -->
|
|
<div class="boost-section">
|
|
<div class="boost-btn hk-boost-btn" :class="{ 'boosted': hkBoostStatus }"
|
|
@click.stop="handleBoostClick('hk')"></div>
|
|
<div class="base-image">
|
|
<img src="@/assets/img/zhongchou/底座.png" alt="底座" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 活动规则弹窗 -->
|
|
<div v-if="showRulesModal" class="modal-overlay" @click="hideRules">
|
|
<div class="modal-content" @click.stop>
|
|
<div class="modal-background">
|
|
<div class="modal-text">
|
|
<div class="rules-list">
|
|
<p>1. 活动时间为2025年7月26日-2025年8月5日。</p>
|
|
<p>2. 每人每天有3个活动助力参与机会。</p>
|
|
<p>3. 助力时间为15分钟,每一个人参与助力,即可时间</p>
|
|
<p> 分钟!</p>
|
|
<p>4. 助力成功后,平台服务市场将获取实时数据!</p>
|
|
<p>5. 平台对数据众筹上线后,您的方案数据将优化成对应</p>
|
|
<p> 大数据的实时数据优化参考。</p>
|
|
</div>
|
|
</div>
|
|
<div class="close-btn" @click="hideRules"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup>
|
|
import { addRecordAPI ,getActivity1API } from '../../api/API'
|
|
import { ref, computed, onMounted, nextTick, watch } from 'vue'
|
|
// 在组件中使用
|
|
async function fetchActivity() {
|
|
try {
|
|
const response = await getActivity1API()
|
|
if (response.code === 200) {
|
|
console.log('活动数据:', response.data)
|
|
// 处理返回的数据
|
|
// response.data 包含:marketOne, marketTwo, startTime, endTime 等字段
|
|
} else {
|
|
console.error('获取活动失败:', response.message)
|
|
}
|
|
} catch (error) {
|
|
console.error('请求错误:', error)
|
|
}
|
|
}
|
|
const numberToChinese = (num) => {
|
|
const chineseNumbers = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五']
|
|
return chineseNumbers[num] || num.toString()
|
|
}
|
|
// 进度条高度动态获取
|
|
const progressBarRef = ref(null)
|
|
const progressBarHeight = ref(0)
|
|
|
|
// 更新进度条高度的函数
|
|
const updateProgressBarHeight = () => {
|
|
if (progressBarRef.value) {
|
|
progressBarHeight.value = progressBarRef.value.offsetHeight
|
|
}
|
|
}
|
|
|
|
// 时间刻度标记 - 从小到大排列(0在顶部,15在底部)
|
|
const timeMarkers = computed(() => {
|
|
return [0, 3, 6, 9, 12, 15]
|
|
})
|
|
|
|
// 获取进度条高度百分比 - 配合刻度逻辑
|
|
const getProgressHeight = (remainingMinutes, totalMinutes = 15) => {
|
|
// 剩余时间越少,进度条越满(从底部向上填充)
|
|
// remainingMinutes = totalMinutes 时,返回 0%(空的,刚开始)
|
|
// remainingMinutes = 0 时,返回 100%(满的,时间用完)
|
|
const usedMinutes = totalMinutes - remainingMinutes
|
|
return Math.max((usedMinutes / totalMinutes) * 100, 0)
|
|
}
|
|
|
|
// 添加活动规则弹窗状态
|
|
const showRules = ref(false)
|
|
|
|
// 原有的组件状态
|
|
const activeArea = ref(null)
|
|
const usBoostStatus = ref(false)
|
|
const hkBoostStatus = ref(false)
|
|
const showRulesModal = ref(false)
|
|
|
|
// 剩余时间数据 - 可控制的初始值
|
|
const usRemainingTime = ref(9) // 美股剩余分钟
|
|
const hkRemainingTime = ref(6) // 港股剩余分钟
|
|
const usTotalTime = ref(15) // 美股总时间15分钟
|
|
const hkTotalTime = ref(15) // 港股总时间15分钟
|
|
|
|
// 计算属性:根据剩余时间计算进度条高度
|
|
const usProgressHeight = computed(() => {
|
|
return getProgressHeight(usRemainingTime.value, usTotalTime.value)
|
|
})
|
|
|
|
const hkProgressHeight = computed(() => {
|
|
return getProgressHeight(hkRemainingTime.value, hkTotalTime.value)
|
|
})
|
|
|
|
// 计算属性:显示的剩余时间
|
|
const usDisplayTime = computed(() => {
|
|
return Math.max(0, usRemainingTime.value)
|
|
})
|
|
|
|
const hkDisplayTime = computed(() => {
|
|
return Math.max(0, hkRemainingTime.value)
|
|
})
|
|
|
|
// 计算已使用时间用于刻度显示
|
|
const usUsedTime = computed(() => {
|
|
return usTotalTime.value - usRemainingTime.value
|
|
})
|
|
|
|
const hkUsedTime = computed(() => {
|
|
return hkTotalTime.value - hkRemainingTime.value
|
|
})
|
|
|
|
// 监听剩余时间变化,更新进度条
|
|
watch([usRemainingTime, hkRemainingTime], () => {
|
|
nextTick(() => {
|
|
updateProgressDisplay()
|
|
})
|
|
})
|
|
|
|
// 更新进度条显示
|
|
const updateProgressDisplay = () => {
|
|
// 更新美股进度条
|
|
const usFill = document.querySelector('.us-content .progress-fill')
|
|
if (usFill) {
|
|
usFill.style.height = `${usProgressHeight.value}%`
|
|
}
|
|
|
|
// 更新港股进度条
|
|
const hkFill = document.querySelector('.hk-content .progress-fill')
|
|
if (hkFill) {
|
|
hkFill.style.height = `${hkProgressHeight.value}%`
|
|
}
|
|
}
|
|
|
|
// 组件挂载时初始化
|
|
onMounted(() => {
|
|
nextTick(() => {
|
|
// 页面加载时自动获取活动数据
|
|
fetchActivity()
|
|
updateProgressBarHeight()
|
|
updateProgressDisplay()
|
|
|
|
// 添加窗口大小改变监听
|
|
window.addEventListener('resize', () => {
|
|
nextTick(() => {
|
|
updateProgressBarHeight()
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
// 模拟时间减少的函数(用于测试)
|
|
const simulateTimeDecrease = (area) => {
|
|
if (area === 'us' && usRemainingTime.value > 0) {
|
|
usRemainingTime.value = Math.max(0, usRemainingTime.value - 1)
|
|
} else if (area === 'hk' && hkRemainingTime.value > 0) {
|
|
hkRemainingTime.value = Math.max(0, hkRemainingTime.value - 1)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleAreaClick = (area) => {
|
|
if (activeArea.value === area) {
|
|
activeArea.value = null
|
|
} else {
|
|
activeArea.value = area
|
|
}
|
|
}
|
|
|
|
const handleBoostClick = async (area) => {
|
|
if (area === 'us' && !usBoostStatus.value) {
|
|
try {
|
|
// 调用助力API
|
|
const response = await addRecordAPI({
|
|
"activityId": 1,
|
|
"marketSign": "usa"
|
|
});
|
|
|
|
if (response.code === 200) {
|
|
usBoostStatus.value = true
|
|
// 助力后减少1分钟时间
|
|
simulateTimeDecrease('us')
|
|
console.log('美股助力成功:', response.message)
|
|
console.log('美股已助力,剩余时间:', usRemainingTime.value)
|
|
} else {
|
|
console.error('美股助力失败:', response.message)
|
|
}
|
|
} catch (error) {
|
|
console.error('美股助力请求失败:', error)
|
|
}
|
|
} else if (area === 'hk' && !hkBoostStatus.value) {
|
|
try {
|
|
// 调用助力API
|
|
const response = await addRecordAPI({
|
|
"activityId": 1,
|
|
"marketSign": "hk"
|
|
});
|
|
|
|
if (response.code === 200) {
|
|
hkBoostStatus.value = true
|
|
// 助力后减少1分钟时间
|
|
simulateTimeDecrease('hk')
|
|
console.log('港股助力成功:', response.message)
|
|
console.log('港股已助力,剩余时间:', hkRemainingTime.value)
|
|
} else {
|
|
console.error('港股助力失败:', response.message)
|
|
}
|
|
} catch (error) {
|
|
console.error('港股助力请求失败:', error)
|
|
}
|
|
}
|
|
}
|
|
|
|
const showRulesFunc = () => {
|
|
showRulesModal.value = true
|
|
}
|
|
|
|
const hideRules = () => {
|
|
showRulesModal.value = false
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
/* 禁用页面滚动 */
|
|
:global(html, body) {
|
|
overflow: hidden;
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
:global(#app) {
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
width: 100vw;
|
|
}
|
|
|
|
.interactive-container {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background: url('@/assets/img/zhongchou/bg.png') no-repeat center center;
|
|
background-size: 100% 100%;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* 顶部区域样式 */
|
|
.top-section {
|
|
display: flex;
|
|
width: 100%;
|
|
margin-top: -7%;
|
|
margin-bottom: 10%;
|
|
}
|
|
|
|
/* 主标题样式 */
|
|
.main-title {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 1;
|
|
gap: 10px;
|
|
}
|
|
|
|
/* 主标题图片响应式样式 */
|
|
.main-title img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
width: auto;
|
|
max-height: 80px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* 活动规则按钮样式 */
|
|
.rules-btn {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-right: 3%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.rules-btn img {
|
|
width: auto;
|
|
height: 40px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.rules-text {
|
|
color: #fff;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.rules-btn:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.main-title h1 {
|
|
font-size: 3rem;
|
|
color: #fff;
|
|
margin: 0;
|
|
text-shadow: 0 0 20px rgba(0, 150, 255, 0.8);
|
|
background: linear-gradient(45deg, #00aaff, #0066cc);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.activity-period {
|
|
background-image: url("@/assets/img/zhongchou/时间边框.png");
|
|
background-repeat: no-repeat;
|
|
background-size: contain;
|
|
background-position: center;
|
|
font-size: 1.2rem;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
display: inline-block;
|
|
padding: 10px 20px;
|
|
min-width: fit-content;
|
|
}
|
|
|
|
|
|
|
|
/* 主要交互区域 */
|
|
.main-interactive-area {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
height: 400px;
|
|
position: relative;
|
|
perspective: 1200px;
|
|
transform-style: preserve-3d;
|
|
}
|
|
|
|
/* 股票区域基础样式 */
|
|
.stock-area {
|
|
position: absolute;
|
|
width: 25vw;
|
|
height: 28vw;
|
|
min-width: 300px;
|
|
min-height: 350px;
|
|
max-width: 500px;
|
|
max-height: 600px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
transition: transform 1s ease;
|
|
transform-style: preserve-3d;
|
|
transform-origin: center center;
|
|
}
|
|
|
|
/* 为所有图片添加渲染优化 */
|
|
/* .stock-card img,
|
|
.rocket-body img,
|
|
.base-image img {
|
|
image-rendering: -webkit-optimize-contrast;
|
|
image-rendering: crisp-edges;
|
|
-webkit-backface-visibility: hidden;
|
|
transform: translateZ(0);
|
|
} */
|
|
/* 美股卡片默认位置 - 火箭左侧,向内倾斜 */
|
|
.left-area {
|
|
transform: translateX(-25vw) rotateY(25deg) scale(1.5);
|
|
}
|
|
|
|
/* 港股卡片默认位置 - 火箭右侧,向内倾斜 */
|
|
.right-area {
|
|
transform: translateX(25vw) rotateY(-25deg) scale(1.5);
|
|
}
|
|
|
|
/* 美股hover效果 - 在原有倾斜基础上轻微上移 */
|
|
.left-area:hover:not(.active):not(.side) {
|
|
transform: translateX(-25vw) rotateY(35deg) translateY(-10px) scale(1.55);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
/* 港股hover效果 - 在原有倾斜基础上轻微上移 */
|
|
.right-area:hover:not(.active):not(.side) {
|
|
transform: translateX(25vw) rotateY(-35deg) translateY(-10px) scale(1.55);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
/* 美股激活时 - 移动到页面中心并取消倾斜 */
|
|
.left-area.active {
|
|
transform: translateX(0) rotateY(0deg) scale(1.6);
|
|
z-index: 20;
|
|
}
|
|
|
|
/* 港股激活时 - 移动到页面中心并取消倾斜 */
|
|
.right-area.active {
|
|
transform: translateX(0) rotateY(0deg) scale(1.6);
|
|
z-index: 20;
|
|
}
|
|
|
|
/* 美股在港股激活时 - 移动到后面并保持倾斜 */
|
|
.left-area.side {
|
|
transform: translateX(-35vw) rotateY(25deg) scale(0.9) !important;
|
|
z-index: 1 !important;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* 港股在美股激活时 - 移动到后面并保持倾斜 */
|
|
.right-area.side {
|
|
transform: translateX(35vw) rotateY(-25deg) scale(0.9) !important;
|
|
z-index: 1 !important;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* 火箭区域 - 始终在圆筒中心 */
|
|
.rocket-area {
|
|
position: absolute;
|
|
z-index: 10;
|
|
transform: translateZ(0);
|
|
/* 新增位置调整 */
|
|
top: 80%;
|
|
/* 垂直居中,可调整为具体像素值如 100px */
|
|
left: 50%;
|
|
/* 水平居中,可调整为具体像素值如 200px */
|
|
transform: translate(-50%, -50%) translateZ(0);
|
|
/* 居中偏移 */
|
|
}
|
|
|
|
.rocket-area.hidden {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
/* 股票卡片样式 */
|
|
.stock-card {
|
|
width: 100%;
|
|
height: auto;
|
|
background-size: 100% 100%;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
/* 美股卡片背景 */
|
|
.us-card {
|
|
background-image: url('@/assets/img/zhongchou/美股.png');
|
|
}
|
|
|
|
/* 港股卡片背景 */
|
|
.hk-card {
|
|
background-image: url('@/assets/img/zhongchou/港股.png') !important;
|
|
}
|
|
|
|
|
|
|
|
.card-content {
|
|
width: 100%;
|
|
height: auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 20px;
|
|
padding: 20px 20px 20px 20px;
|
|
box-sizing: border-box;
|
|
/* 确保padding不会增加总宽度 */
|
|
overflow: hidden;
|
|
/* 防止内容溢出 */
|
|
}
|
|
|
|
/* 美股内容布局 - 进度条在左边 */
|
|
.us-content {
|
|
flex-direction: row;
|
|
}
|
|
|
|
/* 港股内容布局 - 进度条在右边 */
|
|
.hk-content {
|
|
flex-direction: row;
|
|
}
|
|
|
|
/* 股票信息 */
|
|
.stock-info {
|
|
text-align: center;
|
|
color: #fff;
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: flex-start;
|
|
/* 从 flex-start 改为 center */
|
|
align-items: center;
|
|
min-width: 0;
|
|
/* 允许flex项目收缩到内容以下 */
|
|
max-width: 150px;
|
|
/* 限制最大宽度 */
|
|
}
|
|
|
|
/* 股票信息标题样式 */
|
|
.stock-info h3 {
|
|
margin: 5px 0;
|
|
font-size: 1.33rem;
|
|
line-height: 1.2;
|
|
word-wrap: break-word;
|
|
/* 允许长单词换行 */
|
|
overflow-wrap: break-word;
|
|
/* 现代浏览器支持 */
|
|
hyphens: auto;
|
|
/* 自动断字 */
|
|
}
|
|
|
|
/* 通用进度条区域样式 */
|
|
.progress-section {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
/* 美股内容布局 - 进度条在右边,刻度在左边 */
|
|
.us-content {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.us-content .progress-section {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
flex-direction: row-reverse;
|
|
/* 刻度在左,进度条在右 */
|
|
}
|
|
|
|
/* 港股内容布局 - 进度条在左边,刻度在右边 */
|
|
.hk-content {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.hk-content .progress-section {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
flex-direction: row;
|
|
/* 进度条在左,刻度在右 */
|
|
}
|
|
|
|
/* 默认进度条容器样式 */
|
|
.progress-bar {
|
|
width: 20px;
|
|
height: 350px;
|
|
border-radius: 10px;
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
/* 美股进度条容器 - 蓝色主题背景 */
|
|
.us-content .progress-bar {
|
|
background: linear-gradient(to top,
|
|
rgba(79, 195, 247, 0.2),
|
|
rgba(41, 182, 246, 0.3),
|
|
rgba(2, 136, 209, 0.4));
|
|
border: 1px solid rgba(41, 182, 246, 0.5);
|
|
box-shadow: 0 0 10px rgba(41, 182, 246, 0.3);
|
|
}
|
|
|
|
/* 港股进度条容器 - 红色主题背景 */
|
|
.hk-content .progress-bar {
|
|
background: linear-gradient(to top,
|
|
rgba(255, 138, 128, 0.2),
|
|
rgba(255, 87, 34, 0.3),
|
|
rgba(211, 47, 47, 0.4));
|
|
border: 1px solid rgba(255, 87, 34, 0.5);
|
|
box-shadow: 0 0 10px rgba(255, 87, 34, 0.3);
|
|
}
|
|
|
|
.time-markers {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 350px;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 股票内容容器 */
|
|
.stock-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
width: 100%;
|
|
height: auto
|
|
}
|
|
|
|
/* 助力按钮区域样式 */
|
|
.boost-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
/* 助力按钮样式 */
|
|
.boost-btn {
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: transform 0.3s ease;
|
|
z-index: 2;
|
|
background-size: contain;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
width: 240px;
|
|
height: 80px;
|
|
}
|
|
|
|
/* 美股助力按钮 */
|
|
.us-boost-btn {
|
|
background-image: url('@/assets/img/zhongchou/助力美股.png');
|
|
}
|
|
|
|
/* 美股已助力状态 */
|
|
.us-boost-btn.boosted {
|
|
background-image: url('@/assets/img/zhongchou/美股已助力.png');
|
|
}
|
|
|
|
/* 港股助力按钮 */
|
|
.hk-boost-btn {
|
|
background-image: url('@/assets/img/zhongchou/助力港股.png');
|
|
}
|
|
|
|
/* 港股已助力状态 */
|
|
.hk-boost-btn.boosted {
|
|
background-image: url('@/assets/img/zhongchou/港股已助力.png');
|
|
}
|
|
|
|
/* 底座样式 */
|
|
.base-image {
|
|
margin-top: -65px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.base-image img {
|
|
width: auto;
|
|
height: 130px;
|
|
display: block;
|
|
}
|
|
|
|
/* 默认进度条填充样式 */
|
|
.progress-fill {
|
|
position: absolute;
|
|
bottom: 0;
|
|
width: 100%;
|
|
border-radius: 10px;
|
|
transition: height 0.8s ease;
|
|
}
|
|
|
|
/* 美股进度条填充 - 蓝色系渐变 */
|
|
.us-content .progress-fill {
|
|
background: linear-gradient(to top, #4FC3F7, #29B6F6, #0288D1);
|
|
}
|
|
|
|
/* 港股进度条填充 - 红色系渐变 */
|
|
.hk-content .progress-fill {
|
|
background: linear-gradient(to top, #FF8A80, #FF5722, #D32F2F);
|
|
}
|
|
|
|
/* 在进度条填充部分顶部添加火箭gif */
|
|
.progress-fill::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: -25px;
|
|
/* 火箭位置在填充部分顶部上方 */
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 100px;
|
|
height: 100px;
|
|
background-image: url('@/assets/img/zhongchou/rocket.gif');
|
|
background-size: contain;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
z-index: 10;
|
|
}
|
|
|
|
.marker {
|
|
position: relative;
|
|
color: #FFD700;
|
|
/* 默认金色 */
|
|
font-size: 1.4rem;
|
|
font-weight: 700;
|
|
font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
|
|
text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
transition: all 0.5s ease;
|
|
letter-spacing: 0.5px;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
|
|
/* 为刻度数字添加连接线 */
|
|
.marker::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
width: 15px;
|
|
height: 1px;
|
|
background-color: currentColor;
|
|
opacity: 0.6;
|
|
transition: all 0.5s ease;
|
|
}
|
|
|
|
/* 美股刻度连接线 - 从右侧连接到进度条 */
|
|
.us-content .marker::before {
|
|
right: -20px;
|
|
background-color: #00BFFF;
|
|
/* 蓝色 */
|
|
box-shadow: 0 0 4px rgba(0, 191, 255, 0.5);
|
|
}
|
|
|
|
/* 港股刻度连接线 - 从左侧连接到进度条 */
|
|
.hk-content .marker::before {
|
|
left: -20px;
|
|
background-color: #FF4444;
|
|
/* 红色 */
|
|
box-shadow: 0 0 4px rgba(255, 68, 68, 0.5);
|
|
}
|
|
|
|
/* 美股激活刻度 */
|
|
.us-content .marker.reached {
|
|
color: #00BFFF !important;
|
|
text-shadow: 0 0 10px rgba(0, 191, 255, 0.8) !important;
|
|
}
|
|
|
|
/* 港股激活刻度 */
|
|
.hk-content .marker.reached {
|
|
color: #FF4444 !important;
|
|
text-shadow: 0 0 10px rgba(255, 68, 68, 0.8) !important;
|
|
}
|
|
|
|
/* 刻度字体增强样式 */
|
|
/* .marker-text {
|
|
font-weight: bold;
|
|
font-family: 'Arial Black', sans-serif;
|
|
color: transparent;
|
|
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.6);
|
|
text-stroke: 1.5px rgba(255, 255, 255, 0.6);
|
|
text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
|
|
filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
|
|
isolation: isolate;
|
|
z-index: 17;
|
|
position: relative;
|
|
} */
|
|
.us-btn {
|
|
background: linear-gradient(45deg, #0066cc, #0099ff);
|
|
color: white;
|
|
box-shadow: 0 5px 15px rgba(0, 100, 255, 0.4);
|
|
}
|
|
|
|
.hk-btn {
|
|
background: linear-gradient(45deg, #cc3333, #ff6666);
|
|
color: white;
|
|
box-shadow: 0 5px 15px rgba(255, 50, 50, 0.4);
|
|
}
|
|
|
|
.boost-btn:hover {
|
|
background-size: 110%;
|
|
}
|
|
|
|
|
|
|
|
.rocket-container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* .rocket-glow {
|
|
position: absolute;
|
|
width: 300px;
|
|
height: 300px;
|
|
border-radius: 50%;
|
|
background: radial-gradient(circle,
|
|
rgba(0, 150, 255, 0.3) 0%,
|
|
rgba(0, 100, 255, 0.2) 30%,
|
|
transparent 70%);
|
|
animation: pulse 2s ease-in-out infinite;
|
|
} */
|
|
|
|
.rocket-body {
|
|
position: relative;
|
|
z-index: 2;
|
|
animation: float 3s ease-in-out infinite;
|
|
}
|
|
|
|
.rocket-body img {
|
|
width: 15vw;
|
|
height: auto;
|
|
min-width: 100px;
|
|
max-width: 250px;
|
|
}
|
|
|
|
/* 动画效果 */
|
|
@keyframes pulse {
|
|
|
|
0%,
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
50% {
|
|
transform: scale(1.1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes float {
|
|
|
|
0%,
|
|
100% {
|
|
transform: translateY(0px);
|
|
}
|
|
|
|
50% {
|
|
transform: translateY(-10px);
|
|
}
|
|
}
|
|
|
|
/* 响应式设计 - 针对不同屏幕尺寸优化 */
|
|
/* @media (max-width: 1200px) {
|
|
.main-title img {
|
|
max-height: 70px;
|
|
}
|
|
} */
|
|
|
|
@media (max-width: 768px) {
|
|
.main-title img {
|
|
max-height: 60px;
|
|
}
|
|
|
|
.main-interactive-area {
|
|
flex-direction: column;
|
|
gap: 30px;
|
|
}
|
|
|
|
.stock-area {
|
|
width: 35vw;
|
|
height: 40vw;
|
|
min-width: 280px;
|
|
min-height: 320px;
|
|
margin: 0;
|
|
}
|
|
|
|
.left-area {
|
|
transform: translateX(-40vw) rotateY(25deg) scale(1.3);
|
|
}
|
|
|
|
.right-area {
|
|
transform: translateX(40vw) rotateY(-25deg) scale(1.3);
|
|
}
|
|
}
|
|
|
|
/* @media (max-width: 480px) {
|
|
.main-title img {
|
|
max-height: 50px;
|
|
}
|
|
} */
|
|
|
|
/* 弹窗样式 */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal-content {
|
|
position: relative;
|
|
width: 500px;
|
|
height: 400px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-background {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-image: url('@/assets/img/zhongchou/框.png');
|
|
background-size: 100% 100%;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 40px 30px 30px 30px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.modal-text {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
color: #fff;
|
|
text-align: left;
|
|
width: 100%;
|
|
}
|
|
|
|
.rules-list {
|
|
width: 100%;
|
|
line-height: 1.6;
|
|
margin-top: 10%;
|
|
margin-left: 10%;
|
|
}
|
|
|
|
.rules-list p {
|
|
margin: 8px 0;
|
|
font-size: 0.9rem;
|
|
color: #fff;
|
|
}
|
|
|
|
.close-btn {
|
|
background-image: url('@/assets/img/zhongchou/知道了.png');
|
|
background-size: 100%;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
width: 120px;
|
|
height: 40px;
|
|
cursor: pointer;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.close-btn:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/*
|
|
@media (max-width: 768px) {
|
|
.main-interactive-area {
|
|
flex-direction: column;
|
|
gap: 30px;
|
|
}
|
|
|
|
.stock-area {
|
|
width: 300px;
|
|
height: 400px;
|
|
margin: 0;
|
|
}
|
|
|
|
.rocket-area {
|
|
order: -1;
|
|
}
|
|
|
|
.main-title {
|
|
top: 30px;
|
|
}
|
|
|
|
.main-title h1 {
|
|
font-size: 2rem;
|
|
}
|
|
} */
|
|
</style>
|