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

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <div class="interactive-container">
  3. <!-- 顶部区域 -->
  4. <div class="top-section">
  5. <!-- 主标题 -->
  6. <div class="main-title">
  7. <img src="@/assets/img/zhongchou/大标题.png" alt="">
  8. <div class="activity-period">活动时间2025/07/26~2025/08/05</div>
  9. </div>
  10. <!-- 活动规则按钮 -->
  11. <div class="rules-btn" @click="showRules">
  12. <img src="@/assets/img/zhongchou/活动需知.png" alt="活动规则" />
  13. <span class="rules-text">活动规则</span>
  14. </div>
  15. </div>
  16. <!-- 主要交互区域 -->
  17. <div class="main-interactive-area">
  18. <!-- 左侧美股区域 -->
  19. <div class="stock-area left-area" @click="handleAreaClick('us')"
  20. :class="{ active: activeArea === 'us', 'side': activeArea === 'hk' }">
  21. <div class="stock-content">
  22. <div class="stock-card us-card">
  23. <div class="card-content us-content">
  24. <div class="progress-section">
  25. <div class="progress-bar">
  26. <div class="progress-fill"></div>
  27. </div>
  28. <!-- 美股区域刻度 -->
  29. <div class="time-markers">
  30. <div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
  31. 'reached': (15 - usUsedTime) <= time,
  32. 'gold': (15 - usUsedTime) > time
  33. }">
  34. {{ time }}
  35. </div>
  36. </div>
  37. </div>
  38. <!-- 美股剩余时间显示 -->
  39. <div class="stock-info">
  40. <h3>距美股实时数据</h3>
  41. <h3>还剩{{ numberToChinese(usDisplayTime) }}分钟</h3>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 美股助力按钮和底座 -->
  46. <div class="boost-section">
  47. <div class="boost-btn us-boost-btn" :class="{ 'boosted': usBoostStatus }"
  48. @click.stop="handleBoostClick('us')"></div>
  49. <div class="base-image">
  50. <img src="@/assets/img/zhongchou/底座.png" alt="底座" />
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <!-- 中央火箭区域 -->
  56. <div class="rocket-area" :class="{ hidden: activeArea !== null }">
  57. <div class="rocket-container">
  58. <div class="rocket-body">
  59. <img src="@/assets/img/zhongchou/火箭.png" alt="火箭" />
  60. </div>
  61. </div>
  62. </div>
  63. <!-- 右侧港股区域 -->
  64. <div class="stock-area right-area" @click="handleAreaClick('hk')"
  65. :class="{ active: activeArea === 'hk', 'side': activeArea === 'us' }">
  66. <div class="stock-content">
  67. <div class="stock-card hk-card">
  68. <div class="card-content hk-content">
  69. <!-- 港股剩余时间显示 -->
  70. <div class="stock-info">
  71. <h3>距港股实时数据</h3>
  72. <h3>还剩{{ numberToChinese(hkDisplayTime) }}分钟</h3>
  73. </div>
  74. <div class="progress-section">
  75. <div class="progress-bar">
  76. <div class="progress-fill"></div>
  77. </div>
  78. <!-- 港股区域刻度 -->
  79. <div class="time-markers">
  80. <div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
  81. 'reached': (15 - hkUsedTime) <= time,
  82. 'gold': (15 - hkUsedTime) > time
  83. }">
  84. {{ time }}
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <!-- 港股助力按钮和底座 -->
  91. <div class="boost-section">
  92. <div class="boost-btn hk-boost-btn" :class="{ 'boosted': hkBoostStatus }"
  93. @click.stop="handleBoostClick('hk')"></div>
  94. <div class="base-image">
  95. <img src="@/assets/img/zhongchou/底座.png" alt="底座" />
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <!-- 活动规则弹窗 -->
  102. <div v-if="showRulesModal" class="modal-overlay" @click="hideRules">
  103. <div class="modal-content" @click.stop>
  104. <div class="modal-background">
  105. <div class="modal-text">
  106. <div class="rules-list">
  107. <p>1. 活动时间为2025年7月26日-2025年8月5日</p>
  108. <p>2. 每人每天有3个活动助力参与机会</p>
  109. <p>3. 助力时间为15分钟每一个人参与助力即可时间</p>
  110. <p> 分钟</p>
  111. <p>4. 助力成功后平台服务市场将获取实时数据</p>
  112. <p>5. 平台对数据众筹上线后您的方案数据将优化成对应</p>
  113. <p> 大数据的实时数据优化参考</p>
  114. </div>
  115. </div>
  116. <div class="close-btn" @click="hideRules"></div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </template>
  122. <script setup>
  123. import { addRecordAPI ,getActivity1API } from '../../api/API'
  124. import { ref, computed, onMounted, nextTick, watch } from 'vue'
  125. // 在组件中使用
  126. async function fetchActivity() {
  127. try {
  128. const response = await getActivity1API()
  129. if (response.code === 200) {
  130. console.log('活动数据:', response.data)
  131. // 处理返回的数据
  132. // response.data 包含:marketOne, marketTwo, startTime, endTime 等字段
  133. } else {
  134. console.error('获取活动失败:', response.message)
  135. }
  136. } catch (error) {
  137. console.error('请求错误:', error)
  138. }
  139. }
  140. const numberToChinese = (num) => {
  141. const chineseNumbers = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五']
  142. return chineseNumbers[num] || num.toString()
  143. }
  144. // 进度条高度动态获取
  145. const progressBarRef = ref(null)
  146. const progressBarHeight = ref(0)
  147. // 更新进度条高度的函数
  148. const updateProgressBarHeight = () => {
  149. if (progressBarRef.value) {
  150. progressBarHeight.value = progressBarRef.value.offsetHeight
  151. }
  152. }
  153. // 时间刻度标记 - 从小到大排列(0在顶部,15在底部)
  154. const timeMarkers = computed(() => {
  155. return [0, 3, 6, 9, 12, 15]
  156. })
  157. // 获取进度条高度百分比 - 配合刻度逻辑
  158. const getProgressHeight = (remainingMinutes, totalMinutes = 15) => {
  159. // 剩余时间越少,进度条越满(从底部向上填充)
  160. // remainingMinutes = totalMinutes 时,返回 0%(空的,刚开始)
  161. // remainingMinutes = 0 时,返回 100%(满的,时间用完)
  162. const usedMinutes = totalMinutes - remainingMinutes
  163. return Math.max((usedMinutes / totalMinutes) * 100, 0)
  164. }
  165. // 添加活动规则弹窗状态
  166. const showRules = ref(false)
  167. // 原有的组件状态
  168. const activeArea = ref(null)
  169. const usBoostStatus = ref(false)
  170. const hkBoostStatus = ref(false)
  171. const showRulesModal = ref(false)
  172. // 剩余时间数据 - 可控制的初始值
  173. const usRemainingTime = ref(9) // 美股剩余分钟
  174. const hkRemainingTime = ref(6) // 港股剩余分钟
  175. const usTotalTime = ref(15) // 美股总时间15分钟
  176. const hkTotalTime = ref(15) // 港股总时间15分钟
  177. // 计算属性:根据剩余时间计算进度条高度
  178. const usProgressHeight = computed(() => {
  179. return getProgressHeight(usRemainingTime.value, usTotalTime.value)
  180. })
  181. const hkProgressHeight = computed(() => {
  182. return getProgressHeight(hkRemainingTime.value, hkTotalTime.value)
  183. })
  184. // 计算属性:显示的剩余时间
  185. const usDisplayTime = computed(() => {
  186. return Math.max(0, usRemainingTime.value)
  187. })
  188. const hkDisplayTime = computed(() => {
  189. return Math.max(0, hkRemainingTime.value)
  190. })
  191. // 计算已使用时间用于刻度显示
  192. const usUsedTime = computed(() => {
  193. return usTotalTime.value - usRemainingTime.value
  194. })
  195. const hkUsedTime = computed(() => {
  196. return hkTotalTime.value - hkRemainingTime.value
  197. })
  198. // 监听剩余时间变化,更新进度条
  199. watch([usRemainingTime, hkRemainingTime], () => {
  200. nextTick(() => {
  201. updateProgressDisplay()
  202. })
  203. })
  204. // 更新进度条显示
  205. const updateProgressDisplay = () => {
  206. // 更新美股进度条
  207. const usFill = document.querySelector('.us-content .progress-fill')
  208. if (usFill) {
  209. usFill.style.height = `${usProgressHeight.value}%`
  210. }
  211. // 更新港股进度条
  212. const hkFill = document.querySelector('.hk-content .progress-fill')
  213. if (hkFill) {
  214. hkFill.style.height = `${hkProgressHeight.value}%`
  215. }
  216. }
  217. // 组件挂载时初始化
  218. onMounted(() => {
  219. nextTick(() => {
  220. // 页面加载时自动获取活动数据
  221. fetchActivity()
  222. updateProgressBarHeight()
  223. updateProgressDisplay()
  224. // 添加窗口大小改变监听
  225. window.addEventListener('resize', () => {
  226. nextTick(() => {
  227. updateProgressBarHeight()
  228. })
  229. })
  230. })
  231. })
  232. // 模拟时间减少的函数(用于测试)
  233. const simulateTimeDecrease = (area) => {
  234. if (area === 'us' && usRemainingTime.value > 0) {
  235. usRemainingTime.value = Math.max(0, usRemainingTime.value - 1)
  236. } else if (area === 'hk' && hkRemainingTime.value > 0) {
  237. hkRemainingTime.value = Math.max(0, hkRemainingTime.value - 1)
  238. }
  239. }
  240. const handleAreaClick = (area) => {
  241. if (activeArea.value === area) {
  242. activeArea.value = null
  243. } else {
  244. activeArea.value = area
  245. }
  246. }
  247. const handleBoostClick = async (area) => {
  248. if (area === 'us' && !usBoostStatus.value) {
  249. try {
  250. // 调用助力API
  251. const response = await addRecordAPI({
  252. "activityId": 1,
  253. "marketSign": "usa"
  254. });
  255. if (response.code === 200) {
  256. usBoostStatus.value = true
  257. // 助力后减少1分钟时间
  258. simulateTimeDecrease('us')
  259. console.log('美股助力成功:', response.message)
  260. console.log('美股已助力,剩余时间:', usRemainingTime.value)
  261. } else {
  262. console.error('美股助力失败:', response.message)
  263. }
  264. } catch (error) {
  265. console.error('美股助力请求失败:', error)
  266. }
  267. } else if (area === 'hk' && !hkBoostStatus.value) {
  268. try {
  269. // 调用助力API
  270. const response = await addRecordAPI({
  271. "activityId": 1,
  272. "marketSign": "hk"
  273. });
  274. if (response.code === 200) {
  275. hkBoostStatus.value = true
  276. // 助力后减少1分钟时间
  277. simulateTimeDecrease('hk')
  278. console.log('港股助力成功:', response.message)
  279. console.log('港股已助力,剩余时间:', hkRemainingTime.value)
  280. } else {
  281. console.error('港股助力失败:', response.message)
  282. }
  283. } catch (error) {
  284. console.error('港股助力请求失败:', error)
  285. }
  286. }
  287. }
  288. const showRulesFunc = () => {
  289. showRulesModal.value = true
  290. }
  291. const hideRules = () => {
  292. showRulesModal.value = false
  293. }
  294. </script>
  295. <style scoped>
  296. /* 禁用页面滚动 */
  297. :global(html, body) {
  298. overflow: hidden;
  299. margin: 0;
  300. padding: 0;
  301. height: 100%;
  302. width: 100%;
  303. }
  304. :global(#app) {
  305. overflow: hidden;
  306. height: 100vh;
  307. width: 100vw;
  308. }
  309. .interactive-container {
  310. width: 100vw;
  311. height: 100vh;
  312. background: url('@/assets/img/zhongchou/bg.png') no-repeat center center;
  313. background-size: 100% 100%;
  314. position: fixed;
  315. top: 0;
  316. left: 0;
  317. overflow: hidden;
  318. display: flex;
  319. flex-direction: column;
  320. align-items: center;
  321. justify-content: center;
  322. }
  323. /* 顶部区域样式 */
  324. .top-section {
  325. display: flex;
  326. width: 100%;
  327. margin-top: -7%;
  328. margin-bottom: 10%;
  329. }
  330. /* 主标题样式 */
  331. .main-title {
  332. display: flex;
  333. flex-direction: column;
  334. align-items: center;
  335. justify-content: center;
  336. flex: 1;
  337. gap: 10px;
  338. }
  339. /* 主标题图片响应式样式 */
  340. .main-title img {
  341. max-width: 100%;
  342. height: auto;
  343. width: auto;
  344. max-height: 80px;
  345. object-fit: contain;
  346. }
  347. /* 活动规则按钮样式 */
  348. .rules-btn {
  349. display: flex;
  350. flex-direction: column;
  351. margin-right: 3%;
  352. cursor: pointer;
  353. }
  354. .rules-btn img {
  355. width: auto;
  356. height: 40px;
  357. margin-bottom: 5px;
  358. }
  359. .rules-text {
  360. color: #fff;
  361. font-size: 12px;
  362. font-weight: 500;
  363. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  364. white-space: nowrap;
  365. }
  366. .rules-btn:hover {
  367. transform: scale(1.1);
  368. }
  369. .main-title h1 {
  370. font-size: 3rem;
  371. color: #fff;
  372. margin: 0;
  373. text-shadow: 0 0 20px rgba(0, 150, 255, 0.8);
  374. background: linear-gradient(45deg, #00aaff, #0066cc);
  375. -webkit-background-clip: text;
  376. -webkit-text-fill-color: transparent;
  377. background-clip: text;
  378. }
  379. .activity-period {
  380. background-image: url("@/assets/img/zhongchou/时间边框.png");
  381. background-repeat: no-repeat;
  382. background-size: contain;
  383. background-position: center;
  384. font-size: 1.2rem;
  385. color: rgba(255, 255, 255, 0.9);
  386. display: inline-block;
  387. padding: 10px 20px;
  388. min-width: fit-content;
  389. }
  390. /* 主要交互区域 */
  391. .main-interactive-area {
  392. display: flex;
  393. justify-content: center;
  394. align-items: center;
  395. width: 100%;
  396. height: 400px;
  397. position: relative;
  398. perspective: 1200px;
  399. transform-style: preserve-3d;
  400. }
  401. /* 股票区域基础样式 */
  402. .stock-area {
  403. position: absolute;
  404. width: 25vw;
  405. height: 28vw;
  406. min-width: 300px;
  407. min-height: 350px;
  408. max-width: 500px;
  409. max-height: 600px;
  410. display: flex;
  411. justify-content: center;
  412. align-items: center;
  413. transition: transform 1s ease;
  414. transform-style: preserve-3d;
  415. transform-origin: center center;
  416. }
  417. /* 为所有图片添加渲染优化 */
  418. /* .stock-card img,
  419. .rocket-body img,
  420. .base-image img {
  421. image-rendering: -webkit-optimize-contrast;
  422. image-rendering: crisp-edges;
  423. -webkit-backface-visibility: hidden;
  424. transform: translateZ(0);
  425. } */
  426. /* 美股卡片默认位置 - 火箭左侧,向内倾斜 */
  427. .left-area {
  428. transform: translateX(-25vw) rotateY(25deg) scale(1.5);
  429. }
  430. /* 港股卡片默认位置 - 火箭右侧,向内倾斜 */
  431. .right-area {
  432. transform: translateX(25vw) rotateY(-25deg) scale(1.5);
  433. }
  434. /* 美股hover效果 - 在原有倾斜基础上轻微上移 */
  435. .left-area:hover:not(.active):not(.side) {
  436. transform: translateX(-25vw) rotateY(35deg) translateY(-10px) scale(1.55);
  437. transition: transform 0.3s ease;
  438. }
  439. /* 港股hover效果 - 在原有倾斜基础上轻微上移 */
  440. .right-area:hover:not(.active):not(.side) {
  441. transform: translateX(25vw) rotateY(-35deg) translateY(-10px) scale(1.55);
  442. transition: transform 0.3s ease;
  443. }
  444. /* 美股激活时 - 移动到页面中心并取消倾斜 */
  445. .left-area.active {
  446. transform: translateX(0) rotateY(0deg) scale(1.6);
  447. z-index: 20;
  448. }
  449. /* 港股激活时 - 移动到页面中心并取消倾斜 */
  450. .right-area.active {
  451. transform: translateX(0) rotateY(0deg) scale(1.6);
  452. z-index: 20;
  453. }
  454. /* 美股在港股激活时 - 移动到后面并保持倾斜 */
  455. .left-area.side {
  456. transform: translateX(-35vw) rotateY(25deg) scale(0.9) !important;
  457. z-index: 1 !important;
  458. opacity: 0.4;
  459. }
  460. /* 港股在美股激活时 - 移动到后面并保持倾斜 */
  461. .right-area.side {
  462. transform: translateX(35vw) rotateY(-25deg) scale(0.9) !important;
  463. z-index: 1 !important;
  464. opacity: 0.4;
  465. }
  466. /* 火箭区域 - 始终在圆筒中心 */
  467. .rocket-area {
  468. position: absolute;
  469. z-index: 10;
  470. transform: translateZ(0);
  471. /* 新增位置调整 */
  472. top: 80%;
  473. /* 垂直居中,可调整为具体像素值如 100px */
  474. left: 50%;
  475. /* 水平居中,可调整为具体像素值如 200px */
  476. transform: translate(-50%, -50%) translateZ(0);
  477. /* 居中偏移 */
  478. }
  479. .rocket-area.hidden {
  480. opacity: 0.3;
  481. }
  482. /* 股票卡片样式 */
  483. .stock-card {
  484. width: 100%;
  485. height: auto;
  486. background-size: 100% 100%;
  487. background-position: center;
  488. background-repeat: no-repeat;
  489. }
  490. /* 美股卡片背景 */
  491. .us-card {
  492. background-image: url('@/assets/img/zhongchou/美股.png');
  493. }
  494. /* 港股卡片背景 */
  495. .hk-card {
  496. background-image: url('@/assets/img/zhongchou/港股.png') !important;
  497. }
  498. .card-content {
  499. width: 100%;
  500. height: auto;
  501. display: flex;
  502. justify-content: space-between;
  503. align-items: flex-start;
  504. gap: 20px;
  505. padding: 20px 20px 20px 20px;
  506. box-sizing: border-box;
  507. /* 确保padding不会增加总宽度 */
  508. overflow: hidden;
  509. /* 防止内容溢出 */
  510. }
  511. /* 美股内容布局 - 进度条在左边 */
  512. .us-content {
  513. flex-direction: row;
  514. }
  515. /* 港股内容布局 - 进度条在右边 */
  516. .hk-content {
  517. flex-direction: row;
  518. }
  519. /* 股票信息 */
  520. .stock-info {
  521. text-align: center;
  522. color: #fff;
  523. flex: 1;
  524. display: flex;
  525. flex-direction: column;
  526. justify-content: flex-start;
  527. /* 从 flex-start 改为 center */
  528. align-items: center;
  529. min-width: 0;
  530. /* 允许flex项目收缩到内容以下 */
  531. max-width: 150px;
  532. /* 限制最大宽度 */
  533. }
  534. /* 股票信息标题样式 */
  535. .stock-info h3 {
  536. margin: 5px 0;
  537. font-size: 1.33rem;
  538. line-height: 1.2;
  539. word-wrap: break-word;
  540. /* 允许长单词换行 */
  541. overflow-wrap: break-word;
  542. /* 现代浏览器支持 */
  543. hyphens: auto;
  544. /* 自动断字 */
  545. }
  546. /* 通用进度条区域样式 */
  547. .progress-section {
  548. display: flex;
  549. align-items: center;
  550. justify-content: center;
  551. gap: 15px;
  552. }
  553. /* 美股内容布局 - 进度条在右边,刻度在左边 */
  554. .us-content {
  555. flex-direction: row;
  556. }
  557. .us-content .progress-section {
  558. display: flex;
  559. align-items: center;
  560. justify-content: center;
  561. gap: 15px;
  562. flex-direction: row-reverse;
  563. /* 刻度在左,进度条在右 */
  564. }
  565. /* 港股内容布局 - 进度条在左边,刻度在右边 */
  566. .hk-content {
  567. flex-direction: row;
  568. }
  569. .hk-content .progress-section {
  570. display: flex;
  571. align-items: center;
  572. justify-content: center;
  573. gap: 15px;
  574. flex-direction: row;
  575. /* 进度条在左,刻度在右 */
  576. }
  577. /* 默认进度条容器样式 */
  578. .progress-bar {
  579. width: 20px;
  580. height: 350px;
  581. border-radius: 10px;
  582. position: relative;
  583. overflow: visible;
  584. }
  585. /* 美股进度条容器 - 蓝色主题背景 */
  586. .us-content .progress-bar {
  587. background: linear-gradient(to top,
  588. rgba(79, 195, 247, 0.2),
  589. rgba(41, 182, 246, 0.3),
  590. rgba(2, 136, 209, 0.4));
  591. border: 1px solid rgba(41, 182, 246, 0.5);
  592. box-shadow: 0 0 10px rgba(41, 182, 246, 0.3);
  593. }
  594. /* 港股进度条容器 - 红色主题背景 */
  595. .hk-content .progress-bar {
  596. background: linear-gradient(to top,
  597. rgba(255, 138, 128, 0.2),
  598. rgba(255, 87, 34, 0.3),
  599. rgba(211, 47, 47, 0.4));
  600. border: 1px solid rgba(255, 87, 34, 0.5);
  601. box-shadow: 0 0 10px rgba(255, 87, 34, 0.3);
  602. }
  603. .time-markers {
  604. display: flex;
  605. flex-direction: column;
  606. height: 350px;
  607. justify-content: space-between;
  608. align-items: center;
  609. }
  610. /* 股票内容容器 */
  611. .stock-content {
  612. display: flex;
  613. flex-direction: column;
  614. align-items: center;
  615. width: 100%;
  616. height: auto
  617. }
  618. /* 助力按钮区域样式 */
  619. .boost-section {
  620. display: flex;
  621. flex-direction: column;
  622. align-items: center;
  623. position: relative;
  624. width: 100%;
  625. }
  626. /* 助力按钮样式 */
  627. .boost-btn {
  628. border: none;
  629. cursor: pointer;
  630. transition: transform 0.3s ease;
  631. z-index: 2;
  632. background-size: contain;
  633. background-repeat: no-repeat;
  634. background-position: center;
  635. width: 240px;
  636. height: 80px;
  637. }
  638. /* 美股助力按钮 */
  639. .us-boost-btn {
  640. background-image: url('@/assets/img/zhongchou/助力美股.png');
  641. }
  642. /* 美股已助力状态 */
  643. .us-boost-btn.boosted {
  644. background-image: url('@/assets/img/zhongchou/美股已助力.png');
  645. }
  646. /* 港股助力按钮 */
  647. .hk-boost-btn {
  648. background-image: url('@/assets/img/zhongchou/助力港股.png');
  649. }
  650. /* 港股已助力状态 */
  651. .hk-boost-btn.boosted {
  652. background-image: url('@/assets/img/zhongchou/港股已助力.png');
  653. }
  654. /* 底座样式 */
  655. .base-image {
  656. margin-top: -65px;
  657. z-index: 1;
  658. }
  659. .base-image img {
  660. width: auto;
  661. height: 130px;
  662. display: block;
  663. }
  664. /* 默认进度条填充样式 */
  665. .progress-fill {
  666. position: absolute;
  667. bottom: 0;
  668. width: 100%;
  669. border-radius: 10px;
  670. transition: height 0.8s ease;
  671. }
  672. /* 美股进度条填充 - 蓝色系渐变 */
  673. .us-content .progress-fill {
  674. background: linear-gradient(to top, #4FC3F7, #29B6F6, #0288D1);
  675. }
  676. /* 港股进度条填充 - 红色系渐变 */
  677. .hk-content .progress-fill {
  678. background: linear-gradient(to top, #FF8A80, #FF5722, #D32F2F);
  679. }
  680. /* 在进度条填充部分顶部添加火箭gif */
  681. .progress-fill::after {
  682. content: '';
  683. position: absolute;
  684. top: -25px;
  685. /* 火箭位置在填充部分顶部上方 */
  686. left: 50%;
  687. transform: translateX(-50%);
  688. width: 100px;
  689. height: 100px;
  690. background-image: url('@/assets/img/zhongchou/rocket.gif');
  691. background-size: contain;
  692. background-repeat: no-repeat;
  693. background-position: center;
  694. z-index: 10;
  695. }
  696. .marker {
  697. position: relative;
  698. color: #FFD700;
  699. /* 默认金色 */
  700. font-size: 1.4rem;
  701. font-weight: 700;
  702. font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  703. text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
  704. transition: all 0.5s ease;
  705. letter-spacing: 0.5px;
  706. text-rendering: optimizeLegibility;
  707. }
  708. /* 为刻度数字添加连接线 */
  709. .marker::before {
  710. content: '';
  711. position: absolute;
  712. top: 50%;
  713. width: 15px;
  714. height: 1px;
  715. background-color: currentColor;
  716. opacity: 0.6;
  717. transition: all 0.5s ease;
  718. }
  719. /* 美股刻度连接线 - 从右侧连接到进度条 */
  720. .us-content .marker::before {
  721. right: -20px;
  722. background-color: #00BFFF;
  723. /* 蓝色 */
  724. box-shadow: 0 0 4px rgba(0, 191, 255, 0.5);
  725. }
  726. /* 港股刻度连接线 - 从左侧连接到进度条 */
  727. .hk-content .marker::before {
  728. left: -20px;
  729. background-color: #FF4444;
  730. /* 红色 */
  731. box-shadow: 0 0 4px rgba(255, 68, 68, 0.5);
  732. }
  733. /* 美股激活刻度 */
  734. .us-content .marker.reached {
  735. color: #00BFFF !important;
  736. text-shadow: 0 0 10px rgba(0, 191, 255, 0.8) !important;
  737. }
  738. /* 港股激活刻度 */
  739. .hk-content .marker.reached {
  740. color: #FF4444 !important;
  741. text-shadow: 0 0 10px rgba(255, 68, 68, 0.8) !important;
  742. }
  743. /* 刻度字体增强样式 */
  744. /* .marker-text {
  745. font-weight: bold;
  746. font-family: 'Arial Black', sans-serif;
  747. color: transparent;
  748. background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  749. -webkit-background-clip: text;
  750. background-clip: text;
  751. -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.6);
  752. text-stroke: 1.5px rgba(255, 255, 255, 0.6);
  753. text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
  754. filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
  755. isolation: isolate;
  756. z-index: 17;
  757. position: relative;
  758. } */
  759. .us-btn {
  760. background: linear-gradient(45deg, #0066cc, #0099ff);
  761. color: white;
  762. box-shadow: 0 5px 15px rgba(0, 100, 255, 0.4);
  763. }
  764. .hk-btn {
  765. background: linear-gradient(45deg, #cc3333, #ff6666);
  766. color: white;
  767. box-shadow: 0 5px 15px rgba(255, 50, 50, 0.4);
  768. }
  769. .boost-btn:hover {
  770. background-size: 110%;
  771. }
  772. .rocket-container {
  773. position: relative;
  774. width: 100%;
  775. height: auto;
  776. display: flex;
  777. align-items: center;
  778. justify-content: center;
  779. }
  780. /* .rocket-glow {
  781. position: absolute;
  782. width: 300px;
  783. height: 300px;
  784. border-radius: 50%;
  785. background: radial-gradient(circle,
  786. rgba(0, 150, 255, 0.3) 0%,
  787. rgba(0, 100, 255, 0.2) 30%,
  788. transparent 70%);
  789. animation: pulse 2s ease-in-out infinite;
  790. } */
  791. .rocket-body {
  792. position: relative;
  793. z-index: 2;
  794. animation: float 3s ease-in-out infinite;
  795. }
  796. .rocket-body img {
  797. width: 15vw;
  798. height: auto;
  799. min-width: 100px;
  800. max-width: 250px;
  801. }
  802. /* 动画效果 */
  803. @keyframes pulse {
  804. 0%,
  805. 100% {
  806. transform: scale(1);
  807. opacity: 0.7;
  808. }
  809. 50% {
  810. transform: scale(1.1);
  811. opacity: 1;
  812. }
  813. }
  814. @keyframes float {
  815. 0%,
  816. 100% {
  817. transform: translateY(0px);
  818. }
  819. 50% {
  820. transform: translateY(-10px);
  821. }
  822. }
  823. /* 响应式设计 - 针对不同屏幕尺寸优化 */
  824. /* @media (max-width: 1200px) {
  825. .main-title img {
  826. max-height: 70px;
  827. }
  828. } */
  829. @media (max-width: 768px) {
  830. .main-title img {
  831. max-height: 60px;
  832. }
  833. .main-interactive-area {
  834. flex-direction: column;
  835. gap: 30px;
  836. }
  837. .stock-area {
  838. width: 35vw;
  839. height: 40vw;
  840. min-width: 280px;
  841. min-height: 320px;
  842. margin: 0;
  843. }
  844. .left-area {
  845. transform: translateX(-40vw) rotateY(25deg) scale(1.3);
  846. }
  847. .right-area {
  848. transform: translateX(40vw) rotateY(-25deg) scale(1.3);
  849. }
  850. }
  851. /* @media (max-width: 480px) {
  852. .main-title img {
  853. max-height: 50px;
  854. }
  855. } */
  856. /* 弹窗样式 */
  857. .modal-overlay {
  858. position: fixed;
  859. top: 0;
  860. left: 0;
  861. width: 100vw;
  862. height: 100vh;
  863. background: rgba(0, 0, 0, 0.7);
  864. display: flex;
  865. justify-content: center;
  866. align-items: center;
  867. z-index: 1000;
  868. }
  869. .modal-content {
  870. position: relative;
  871. width: 500px;
  872. height: 400px;
  873. display: flex;
  874. justify-content: center;
  875. align-items: center;
  876. }
  877. .modal-background {
  878. width: 100%;
  879. height: 100%;
  880. background-image: url('@/assets/img/zhongchou/框.png');
  881. background-size: 100% 100%;
  882. background-repeat: no-repeat;
  883. background-position: center;
  884. display: flex;
  885. flex-direction: column;
  886. justify-content: space-between;
  887. align-items: center;
  888. padding: 40px 30px 30px 30px;
  889. box-sizing: border-box;
  890. }
  891. .modal-text {
  892. flex: 1;
  893. display: flex;
  894. flex-direction: column;
  895. align-items: center;
  896. color: #fff;
  897. text-align: left;
  898. width: 100%;
  899. }
  900. .rules-list {
  901. width: 100%;
  902. line-height: 1.6;
  903. margin-top: 10%;
  904. margin-left: 10%;
  905. }
  906. .rules-list p {
  907. margin: 8px 0;
  908. font-size: 0.9rem;
  909. color: #fff;
  910. }
  911. .close-btn {
  912. background-image: url('@/assets/img/zhongchou/知道了.png');
  913. background-size: 100%;
  914. background-repeat: no-repeat;
  915. background-position: center;
  916. width: 120px;
  917. height: 40px;
  918. cursor: pointer;
  919. transition: transform 0.2s ease;
  920. }
  921. .close-btn:hover {
  922. transform: scale(1.05);
  923. }
  924. /*
  925. @media (max-width: 768px) {
  926. .main-interactive-area {
  927. flex-direction: column;
  928. gap: 30px;
  929. }
  930. .stock-area {
  931. width: 300px;
  932. height: 400px;
  933. margin: 0;
  934. }
  935. .rocket-area {
  936. order: -1;
  937. }
  938. .main-title {
  939. top: 30px;
  940. }
  941. .main-title h1 {
  942. font-size: 2rem;
  943. }
  944. } */
  945. </style>