hero.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <section class="hero">
  3. <div class="hero-content">
  4. <div class="hero-text">
  5. <h1 class="hero-title">智慧社区整体解决方案</h1>
  6. <p class="hero-subtitle">绘家科技助力物业管理数字化转型,提升服务品质与业主满意度。</p>
  7. <ul class="hero-metrics">
  8. <li v-for="(item, index) in metrics" :key="index" class="metric">
  9. <strong class="metric-value">{{ item.value }}</strong>
  10. <span class="metric-label">{{ item.label }}</span>
  11. </li>
  12. </ul>
  13. <div class="hero-actions">
  14. <button class="btn-primary hero-btn-primary">查看方案</button>
  15. <button class="hero-btn-outline" @click="openConsultation">免费咨询</button>
  16. </div>
  17. </div>
  18. </div>
  19. </section>
  20. </template>
  21. <script setup lang="ts">
  22. const { openConsultation } = useConsultation()
  23. const metrics = [
  24. { value: '300+', label: '服务客户' },
  25. { value: '800+', label: '管理小区' },
  26. { value: '50w+', label: '管理房屋' },
  27. ]
  28. </script>
  29. <style scoped lang="scss">
  30. .hero {
  31. @apply h-680px relative overflow-hidden;
  32. @apply lt-sm:w-full lt-sm:h-auto lt-sm:aspect-[750/880];
  33. background-size: cover;
  34. background-position: center;
  35. background-image: url('@/assets/images/banner.png');
  36. @screen lt-sm {
  37. @apply w-full h-auto;
  38. aspect-ratio: 750/880;
  39. background-image: url('@/assets/images/banner-mobile.png');
  40. background-size: 100% 100%;
  41. background-repeat: no-repeat;
  42. background-position: center;
  43. }
  44. .hero-content {
  45. @extend %landing-container;
  46. @apply flex items-center pb-48px pt-200px;
  47. @apply lt-sm:pt-80px;
  48. }
  49. .hero-text {
  50. @apply text-left w-full;
  51. @apply lt-sm:text-center;
  52. }
  53. .hero-metrics {
  54. @apply mt-35px flex items-center gap-48px;
  55. @apply lt-sm:justify-center lt-sm:mt-20px lt-sm:gap-76px;
  56. }
  57. .hero-title {
  58. @apply font-s-48px font-semibold text-#000000;
  59. @apply lt-sm:font-s-56px;
  60. }
  61. .hero-subtitle {
  62. @apply font-s-18px text-#091221/70;
  63. @apply lt-sm:mt-12px lt-sm:font-s-26px lt-sm:px-25px;
  64. @apply lt-xs:px-0;
  65. }
  66. .hero-actions {
  67. @apply mt-35px flex items-center gap-16px;
  68. @apply lt-sm:justify-center lt-sm:absolute lt-sm:bottom-80px lt-sm:left-1/2 lt-sm:-translate-x-1/2;
  69. }
  70. .hero-btn-primary {
  71. @apply w-127px h-56px rounded-8px text-white font-s-18px pf-sc-semibold;
  72. @apply lt-sm:w-168px lt-sm:h-71px lt-sm:font-s-24px lt-sm:rounded-8px;
  73. }
  74. .hero-btn-outline {
  75. @apply w-127px h-56px bg-white border-#0F67F8 border-1 rounded-8px hover:opacity-80 font-s-18px font-semibold text-#0F67F8;
  76. @apply lt-sm:w-168px lt-sm:h-71px lt-sm:font-s-24px lt-sm:rounded-8px;
  77. }
  78. .metric {
  79. @apply flex items-start flex-col;
  80. @apply lt-sm:items-center;
  81. .metric-value {
  82. @apply font-s-32px font-semibold text-#0F67F8;
  83. @apply lt-sm:font-s-52px;
  84. }
  85. .metric-label {
  86. @apply font-s-14px text-#384146;
  87. @apply lt-sm:font-s-24px;
  88. }
  89. }
  90. }
  91. .btn-primary {
  92. @apply bg-gradient-to-r from-[#779EFF] to-[#0A50FF];
  93. border: none;
  94. outline: none;
  95. &:hover {
  96. opacity: 0.8;
  97. }
  98. }
  99. </style>