HomeView.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. <script setup lang="ts">
  2. import { computed } from "vue";
  3. import { useI18n } from "vue-i18n";
  4. import { storeToRefs } from "pinia";
  5. import { useAuthStore } from "@/stores/auth";
  6. import { AUTH_ENABLED } from "@/utils/featureFlags";
  7. import aboutMountain from "@/assets/home/about-mountain.png";
  8. // import visionBlackhole from "@/assets/home/vision-blackhole.png";
  9. import iconAsset from "@/assets/home/icon-asset.png";
  10. import iconSpeed from "@/assets/home/icon-speed.png";
  11. import iconGlobal from "@/assets/home/icon-global.png";
  12. import iconFee from "@/assets/home/icon-fee.png";
  13. import iconEco from "@/assets/home/icon-eco.png";
  14. import iconMission from "@/assets/home/icon-mission.png";
  15. import iconPurpose from "@/assets/home/icon-purpose.png";
  16. import cardGlow1 from "@/assets/home/card-glow-1.png";
  17. import cardGlow2 from "@/assets/home/card-glow-2.png";
  18. import cardGlow3 from "@/assets/home/card-glow-3.png";
  19. import cardGlow4 from "@/assets/home/card-glow-4.png";
  20. import authVisual from "@/assets/auth/auth-visual.png";
  21. const { t } = useI18n();
  22. const advantages = computed(() => [
  23. {
  24. icon: iconAsset,
  25. glow: cardGlow1,
  26. titleKey: "home.assetSafetyTitle",
  27. descKey: "home.assetSafetyDesc",
  28. },
  29. {
  30. icon: iconSpeed,
  31. glow: cardGlow2,
  32. titleKey: "home.highPerfTitle",
  33. descKey: "home.highPerfDesc",
  34. },
  35. {
  36. icon: iconGlobal,
  37. glow: cardGlow3,
  38. titleKey: "home.globalComplianceTitle",
  39. descKey: "home.globalComplianceDesc",
  40. },
  41. {
  42. icon: iconFee,
  43. glow: cardGlow4,
  44. titleKey: "home.transparentFeeTitle",
  45. descKey: "home.transparentFeeDesc",
  46. },
  47. ]);
  48. const visionItems = computed(() => [
  49. { icon: iconEco, titleKey: "home.ecoTitle", descKey: "home.ecoDesc" },
  50. {
  51. icon: iconMission,
  52. titleKey: "home.missionTitle",
  53. descKey: "home.missionDesc",
  54. },
  55. {
  56. icon: iconPurpose,
  57. titleKey: "home.purposeTitle",
  58. descKey: "home.purposeDesc",
  59. },
  60. ]);
  61. const { isLoggedIn } = storeToRefs(useAuthStore());
  62. </script>
  63. <template>
  64. <main class="page-main home">
  65. <!-- Hero -->
  66. <section class="hero">
  67. <div class="page-container hero-inner">
  68. <div class="hero-text">
  69. <h1 class="hero-title">{{ t("home.heroTitle") }}</h1>
  70. <p class="hero-desc">{{ t("home.heroDesc") }}</p>
  71. <div class="hero-actions">
  72. <RouterLink
  73. v-if="AUTH_ENABLED && !isLoggedIn"
  74. to="/register"
  75. class="btn btn-primary"
  76. >{{ t("home.register") }}</RouterLink
  77. >
  78. <RouterLink
  79. to="/market"
  80. class="btn"
  81. :class="
  82. AUTH_ENABLED && !isLoggedIn ? 'btn-outline' : 'btn-primary'
  83. "
  84. >{{ t("home.viewMarket") }}</RouterLink
  85. >
  86. <RouterLink
  87. v-if="!AUTH_ENABLED"
  88. to="/download"
  89. class="btn btn-outline"
  90. >{{ t("home.downloadApp") }}</RouterLink
  91. >
  92. </div>
  93. </div>
  94. <div class="hero-visual">
  95. <img
  96. :src="authVisual"
  97. :alt="t('home.heroImageAlt')"
  98. class="hero-visual-img"
  99. loading="eager"
  100. decoding="async"
  101. />
  102. </div>
  103. </div>
  104. </section>
  105. <!-- 平台核心优势 -->
  106. <section class="section advantages-section">
  107. <div class="page-container">
  108. <h2 class="section-title">{{ t("home.coreAdvantages") }}</h2>
  109. <div class="advantages-grid">
  110. <div
  111. v-for="item in advantages"
  112. :key="item.titleKey"
  113. class="advantage-card"
  114. :style="{ backgroundImage: `url(${item.glow})` }"
  115. >
  116. <img
  117. :src="item.icon"
  118. :alt="t(item.titleKey)"
  119. class="advantage-icon"
  120. />
  121. <h3 class="advantage-title">{{ t(item.titleKey) }}</h3>
  122. <p class="advantage-desc">{{ t(item.descKey) }}</p>
  123. </div>
  124. <div class="advantages-cross" aria-hidden="true" />
  125. </div>
  126. </div>
  127. </section>
  128. <!-- 关于我们 -->
  129. <section class="about-section">
  130. <div class="page-container about-inner">
  131. <div class="about-visual">
  132. <img
  133. :src="aboutMountain"
  134. :alt="t('home.aboutImageAlt')"
  135. class="about-image"
  136. />
  137. </div>
  138. <div class="about-content">
  139. <h2 class="about-title">{{ t("home.aboutUs") }}</h2>
  140. <p class="about-desc">{{ t("home.aboutDesc") }}</p>
  141. <p class="about-meta">{{ t("home.foundedYear") }}</p>
  142. <p class="about-meta">{{ t("home.headquarters") }}</p>
  143. </div>
  144. </div>
  145. </section>
  146. <!-- 我们的愿景 -->
  147. <section class="vision-section">
  148. <div class="page-container">
  149. <h2 class="section-title">{{ t("home.ourVision") }}</h2>
  150. <p class="vision-subtitle">{{ t("home.visionSubtitle") }}</p>
  151. <!-- <div
  152. class="vision-deco"
  153. :style="{ backgroundImage: `url(${visionBlackhole})` }"
  154. /> -->
  155. <div class="vision-grid">
  156. <div
  157. v-for="item in visionItems"
  158. :key="item.titleKey"
  159. class="vision-card"
  160. >
  161. <img :src="item.icon" :alt="t(item.titleKey)" class="vision-icon" />
  162. <h3 class="vision-title">{{ t(item.titleKey) }}</h3>
  163. <p class="vision-desc">{{ t(item.descKey) }}</p>
  164. </div>
  165. </div>
  166. </div>
  167. </section>
  168. </main>
  169. </template>
  170. <style scoped>
  171. .home {
  172. background: #0a0a0a;
  173. color: #fff;
  174. }
  175. /* ==========================================================================
  176. Hero
  177. ========================================================================== */
  178. .hero {
  179. position: relative;
  180. overflow: hidden;
  181. background:
  182. radial-gradient(
  183. ellipse 65% 45% at 50% 28%,
  184. rgba(240, 185, 11, 0.12) 0%,
  185. transparent 60%
  186. ),
  187. #0a0a0a;
  188. }
  189. .hero-inner {
  190. padding-top: var(--space-20);
  191. padding-bottom: var(--space-20);
  192. display: grid;
  193. grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  194. gap: var(--space-10);
  195. align-items: center;
  196. }
  197. .hero-visual {
  198. display: flex;
  199. justify-content: center;
  200. align-items: center;
  201. }
  202. .hero-visual-img {
  203. width: 100%;
  204. max-width: 560px;
  205. height: auto;
  206. display: block;
  207. object-fit: contain;
  208. user-select: none;
  209. pointer-events: none;
  210. }
  211. .hero-title {
  212. font-size: 48px;
  213. font-weight: 700;
  214. line-height: 1.3;
  215. color: #fff;
  216. margin-bottom: var(--space-6);
  217. letter-spacing: 0.5px;
  218. white-space: pre-line;
  219. }
  220. .hero-desc {
  221. font-size: 15px;
  222. color: #999;
  223. line-height: 1.85;
  224. max-width: 480px;
  225. margin-bottom: var(--space-8);
  226. }
  227. .hero-actions {
  228. display: flex;
  229. gap: var(--space-4);
  230. flex-wrap: wrap;
  231. }
  232. .btn {
  233. display: inline-flex;
  234. align-items: center;
  235. justify-content: center;
  236. min-width: 132px;
  237. height: 44px;
  238. padding: 0 var(--space-6);
  239. font-size: 15px;
  240. font-weight: 600;
  241. border-radius: 22px;
  242. text-decoration: none;
  243. transition: all 0.2s ease;
  244. }
  245. .btn-primary {
  246. background: var(--color-primary);
  247. color: #1a1a1a;
  248. }
  249. .btn-primary:hover {
  250. background: var(--color-primary-hover);
  251. transform: translateY(-1px);
  252. }
  253. .btn-outline {
  254. background: transparent;
  255. color: #fff;
  256. border: 1px solid rgba(255, 255, 255, 0.3);
  257. }
  258. .btn-outline:hover {
  259. border-color: var(--color-primary);
  260. color: var(--color-primary);
  261. }
  262. /* ==========================================================================
  263. 平台核心优势
  264. ========================================================================== */
  265. .advantages-section {
  266. background: #0a0a0a;
  267. padding: var(--space-20) 0;
  268. position: relative;
  269. }
  270. .section-title {
  271. font-size: 32px;
  272. font-weight: 700;
  273. color: #fff;
  274. text-align: center;
  275. margin-bottom: var(--space-12);
  276. }
  277. .advantages-grid {
  278. position: relative;
  279. display: grid;
  280. grid-template-columns: repeat(2, 1fr);
  281. gap: var(--space-5);
  282. max-width: 920px;
  283. margin: 0 auto;
  284. }
  285. .advantage-card {
  286. position: relative;
  287. padding: var(--space-8) var(--space-6);
  288. background-color: #111;
  289. background-size: cover;
  290. background-position: center;
  291. background-repeat: no-repeat;
  292. border: 1px solid rgba(255, 255, 255, 0.05);
  293. border-radius: 14px;
  294. overflow: hidden;
  295. transition:
  296. transform 0.25s ease,
  297. border-color 0.25s ease;
  298. }
  299. .advantage-card:hover {
  300. transform: translateY(-2px);
  301. border-color: rgba(240, 185, 11, 0.3);
  302. }
  303. .advantage-icon {
  304. width: 56px;
  305. height: 56px;
  306. object-fit: contain;
  307. margin-bottom: var(--space-4);
  308. }
  309. .advantage-title {
  310. font-size: 20px;
  311. font-weight: 600;
  312. color: var(--color-primary);
  313. margin-bottom: var(--space-3);
  314. }
  315. .advantage-desc {
  316. font-size: 13px;
  317. color: #999;
  318. line-height: 1.75;
  319. }
  320. .advantages-cross {
  321. position: absolute;
  322. inset: 0;
  323. pointer-events: none;
  324. background:
  325. radial-gradient(
  326. circle at 50% 50%,
  327. rgba(240, 185, 11, 0.35) 0%,
  328. transparent 12%
  329. ),
  330. linear-gradient(
  331. to right,
  332. transparent calc(50% - 0.5px),
  333. rgba(240, 185, 11, 0.25) calc(50% - 0.5px),
  334. rgba(240, 185, 11, 0.25) calc(50% + 0.5px),
  335. transparent calc(50% + 0.5px)
  336. ),
  337. linear-gradient(
  338. to bottom,
  339. transparent calc(50% - 0.5px),
  340. rgba(240, 185, 11, 0.25) calc(50% - 0.5px),
  341. rgba(240, 185, 11, 0.25) calc(50% + 0.5px),
  342. transparent calc(50% + 0.5px)
  343. );
  344. }
  345. /* ==========================================================================
  346. 关于我们
  347. ========================================================================== */
  348. .about-section {
  349. padding: var(--space-20) 0;
  350. background: #0a0a0a;
  351. }
  352. .about-inner {
  353. display: grid;
  354. grid-template-columns: 1.1fr 1fr;
  355. gap: var(--space-12);
  356. align-items: center;
  357. }
  358. .about-visual {
  359. display: flex;
  360. justify-content: center;
  361. }
  362. .about-image {
  363. width: 100%;
  364. max-width: 460px;
  365. height: auto;
  366. display: block;
  367. }
  368. .about-title {
  369. font-size: 32px;
  370. font-weight: 700;
  371. color: #fff;
  372. margin-bottom: var(--space-5);
  373. }
  374. .about-desc {
  375. font-size: 14px;
  376. color: #999;
  377. line-height: 1.85;
  378. margin-bottom: var(--space-5);
  379. max-width: 440px;
  380. }
  381. .about-meta {
  382. font-size: 15px;
  383. font-weight: 600;
  384. color: var(--color-primary);
  385. margin-bottom: var(--space-2);
  386. }
  387. /* ==========================================================================
  388. 我们的愿景
  389. ========================================================================== */
  390. .vision-section {
  391. background: #0a0a0a;
  392. padding: var(--space-20) 0 var(--space-16);
  393. position: relative;
  394. overflow: hidden;
  395. }
  396. .vision-subtitle {
  397. text-align: center;
  398. font-size: 16px;
  399. color: var(--color-primary);
  400. font-weight: 500;
  401. margin-top: calc(-1 * var(--space-8));
  402. margin-bottom: var(--space-8);
  403. }
  404. .vision-deco {
  405. width: 100%;
  406. max-width: 680px;
  407. height: 180px;
  408. margin: 0 auto var(--space-10);
  409. background-size: contain;
  410. background-position: center;
  411. background-repeat: no-repeat;
  412. }
  413. .vision-grid {
  414. display: grid;
  415. grid-template-columns: repeat(3, 1fr);
  416. gap: var(--space-5);
  417. max-width: 920px;
  418. margin: 0 auto;
  419. }
  420. .vision-card {
  421. position: relative;
  422. padding: var(--space-8) var(--space-6);
  423. background: linear-gradient(180deg, #1a1a1a 0%, #0e0e0e 100%);
  424. border: 1px solid rgba(255, 255, 255, 0.06);
  425. border-radius: 14px;
  426. transition:
  427. transform 0.25s ease,
  428. border-color 0.25s ease;
  429. }
  430. .vision-card:hover {
  431. transform: translateY(-2px);
  432. border-color: rgba(240, 185, 11, 0.3);
  433. }
  434. .vision-icon {
  435. width: 56px;
  436. height: 56px;
  437. object-fit: contain;
  438. margin-bottom: var(--space-4);
  439. }
  440. .vision-title {
  441. font-size: 18px;
  442. font-weight: 600;
  443. color: var(--color-primary);
  444. margin-bottom: var(--space-2);
  445. }
  446. .vision-desc {
  447. font-size: 13px;
  448. color: #999;
  449. line-height: 1.7;
  450. }
  451. /* ==========================================================================
  452. 响应式 · 平板
  453. ========================================================================== */
  454. @media (max-width: 960px) {
  455. .hero-inner {
  456. padding-top: var(--space-12);
  457. padding-bottom: var(--space-12);
  458. grid-template-columns: 1fr;
  459. text-align: center;
  460. gap: var(--space-8);
  461. }
  462. .hero-title {
  463. font-size: 36px;
  464. }
  465. .hero-desc {
  466. margin-left: auto;
  467. margin-right: auto;
  468. }
  469. .hero-actions {
  470. justify-content: center;
  471. }
  472. .hero-visual-img {
  473. max-width: 420px;
  474. margin: 0 auto;
  475. }
  476. .about-inner {
  477. grid-template-columns: 1fr;
  478. gap: var(--space-8);
  479. text-align: center;
  480. }
  481. .about-desc {
  482. margin-left: auto;
  483. margin-right: auto;
  484. }
  485. .about-image {
  486. max-width: 360px;
  487. }
  488. .vision-grid {
  489. grid-template-columns: repeat(3, 1fr);
  490. gap: var(--space-4);
  491. }
  492. }
  493. /* ==========================================================================
  494. 响应式 · 手机
  495. ========================================================================== */
  496. @media (max-width: 640px) {
  497. .hero {
  498. background:
  499. radial-gradient(
  500. ellipse 80% 40% at 50% 25%,
  501. rgba(240, 185, 11, 0.15) 0%,
  502. transparent 65%
  503. ),
  504. #0a0a0a;
  505. }
  506. .hero-inner {
  507. padding-top: var(--space-10);
  508. padding-bottom: var(--space-10);
  509. gap: var(--space-6);
  510. }
  511. .hero-title {
  512. font-size: 26px;
  513. line-height: 1.35;
  514. }
  515. .hero-desc {
  516. font-size: 13px;
  517. line-height: 1.8;
  518. }
  519. .btn {
  520. min-width: 120px;
  521. height: 40px;
  522. font-size: 14px;
  523. }
  524. .hero-visual-img {
  525. max-width: min(100%, 320px);
  526. }
  527. .section-title {
  528. font-size: 24px;
  529. margin-bottom: var(--space-8);
  530. }
  531. .advantages-section {
  532. padding: var(--space-12) 0;
  533. }
  534. .advantages-grid {
  535. gap: var(--space-3);
  536. }
  537. .advantage-card {
  538. padding: var(--space-6) var(--space-4);
  539. }
  540. .advantage-icon {
  541. width: 44px;
  542. height: 44px;
  543. margin-bottom: var(--space-3);
  544. }
  545. .advantage-title {
  546. font-size: 16px;
  547. margin-bottom: var(--space-2);
  548. }
  549. .advantage-desc {
  550. font-size: 12px;
  551. line-height: 1.7;
  552. }
  553. .about-section {
  554. padding: var(--space-12) 0;
  555. }
  556. .about-title {
  557. font-size: 24px;
  558. }
  559. .about-desc {
  560. font-size: 13px;
  561. }
  562. .about-meta {
  563. font-size: 14px;
  564. }
  565. .about-image {
  566. max-width: 280px;
  567. }
  568. .vision-section {
  569. padding: var(--space-12) 0;
  570. }
  571. .vision-subtitle {
  572. font-size: 13px;
  573. padding: 0 var(--space-4);
  574. margin-top: calc(-1 * var(--space-6));
  575. }
  576. .vision-deco {
  577. height: 120px;
  578. }
  579. .vision-grid {
  580. grid-template-columns: 1fr;
  581. gap: var(--space-3);
  582. }
  583. .vision-card {
  584. padding: var(--space-6) var(--space-5);
  585. }
  586. .vision-icon {
  587. width: 48px;
  588. height: 48px;
  589. }
  590. .vision-title {
  591. font-size: 16px;
  592. }
  593. .vision-desc {
  594. font-size: 12px;
  595. }
  596. }
  597. </style>