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.

1277 lines
34 KiB

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