CaseCard.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <div class="case-container">
  3. <div class="case-cards">
  4. <div class="card-content">
  5. <!-- 左侧 Tabs -->
  6. <div class="tabs-list">
  7. <div v-for="(item, index) in cases" :key="index" class="tab-item" :class="{ active: activeIndex === index }"
  8. @click="activeIndex = index">
  9. {{ item.title }}
  10. </div>
  11. </div>
  12. <!-- 右侧内容 -->
  13. <div class="tab-content">
  14. <transition name="fade" mode="out-in">
  15. <div :key="activeIndex" class="content-wrapper">
  16. <div class="text-content">
  17. <h3 class="title">{{ cases[activeIndex].title }}</h3>
  18. <p class="description">{{ cases[activeIndex].description }}</p>
  19. <h4 class="title">业务价值</h4>
  20. <p class="value-desc">{{ cases[activeIndex].value }}</p>
  21. </div>
  22. <div class="image-content">
  23. <NuxtPicture :src="cases[activeIndex].image" :alt="cases[activeIndex].title" />
  24. </div>
  25. </div>
  26. </transition>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script setup>
  33. const activeIndex = ref(0);
  34. const cases = [
  35. {
  36. title: '网站提速',
  37. description: '针对网页静态资源的优化和加速分发,解决网站流量激增时用户请求量、带宽负载增高、服务器压力过大以及站点响应缓慢的问题。',
  38. value: '通过压缩优化,快速加载大图、样式等资源,缩短网页响应时间,提升用户体验。访问数据决定回源行为,减少回源流量,提高请求命中率,降低带宽成本。',
  39. image: '/images/products/case1.png'
  40. },
  41. {
  42. title: '下载加速',
  43. description: '适用于网站或应用的静态大文件分发,如游戏安装包、应用更新文件、补丁程序文件、音视频文件、建筑数据模型、医疗图像等较大的文件。',
  44. value: '通过海量加速节点,用户获得极速下载体验。分段缓存技术增强大文件下载的传输稳定性,确保顺畅的文件传输。',
  45. image: '/images/products/case2.png'
  46. },
  47. {
  48. title: '音视频加速',
  49. description: '针对视频网站、短视频等业务场景,优化源站出口压力,解决用户在观看音视频时的卡顿和不流畅问题。',
  50. value: '通过海量加速节点支持高并发,提供高速稳定的资源分发,确保流畅、稳定和丰富的观看体验。同时,丰富的访问控制功能有效防止用户盗用媒体资源。',
  51. image: '/images/products/case3.png'
  52. },
  53. {
  54. title: '安全防护',
  55. description: '黑客通过扫描发现互联网应用的安全漏洞,并利用爬虫、挂马、黑客病毒、数据泄露、CC攻击等手段入侵服务器和数据库,窃取核心业务数据。',
  56. value: '提供恶意URL过滤、入侵防护等全面的用户防护能力,有效防御常见Web攻击。同时提供Referer黑白名单和高阶URL鉴权,全面解决盗链问题。',
  57. image: '/images/products/case4.png'
  58. }
  59. ];
  60. </script>
  61. <style lang="scss" scoped>
  62. .case-container {
  63. position: relative;
  64. width: 100%;
  65. height: 800px;
  66. background: url('/images/products/case-bg.png') no-repeat center;
  67. background-size: cover;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. &::before {
  72. position: absolute;
  73. content: '应用场景';
  74. top: -45px;
  75. left: 50%;
  76. transform: translateX(-50%);
  77. font-size: 45px;
  78. font-style: normal;
  79. font-weight: 500;
  80. line-height: 45px;
  81. background: linear-gradient(91deg, #B8AFFF 10.8%, #C597FF 108.3%);
  82. background-clip: text;
  83. -webkit-background-clip: text;
  84. -webkit-text-fill-color: transparent;
  85. }
  86. .case-cards {
  87. width: 100%;
  88. max-width: 1200px;
  89. margin-top: 60px;
  90. }
  91. .card-content {
  92. display: flex;
  93. gap: 80px;
  94. align-items: flex-start;
  95. }
  96. .tabs-list {
  97. display: flex;
  98. flex-direction: column;
  99. gap: 24px;
  100. width: 224px;
  101. flex-shrink: 0;
  102. }
  103. .tab-item {
  104. height: 72px;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. border-radius: 8px;
  109. border: 1px solid rgba(255, 255, 255, 0.20);
  110. background: rgba(255, 255, 255, 0.10);
  111. color: rgba(255, 255, 255, 0.60);
  112. ;
  113. cursor: pointer;
  114. font-size: 26px;
  115. font-weight: 400;
  116. line-height: 26px;
  117. &:hover {
  118. border-radius: 8px;
  119. background: linear-gradient(91deg, #A39DFF 1.24%, #7D46FF 122.93%);
  120. }
  121. &.active {
  122. background: linear-gradient(91deg, #A39DFF 1.24%, #7D46FF 122.93%);
  123. color: #fff;
  124. font-weight: 500;
  125. }
  126. }
  127. .tab-content {
  128. flex: 1;
  129. color: #fff;
  130. height: 500px; // Fixed height to prevent jitter
  131. }
  132. .content-wrapper {
  133. display: flex;
  134. align-items: stretch;
  135. /* 让左右两列在高度上保持一致(无 JS) */
  136. gap: 36px;
  137. }
  138. .text-content {
  139. width: 540px;
  140. flex-shrink: 0;
  141. display: flex;
  142. flex-direction: column;
  143. gap: 18px;
  144. justify-content: center;
  145. .title {
  146. font-size: 36px;
  147. font-weight: 500;
  148. }
  149. .description {
  150. font-size: 18px;
  151. font-weight: 400;
  152. line-height: 36px;
  153. margin-bottom: 38px;
  154. }
  155. .value-desc {
  156. font-size: 18px;
  157. font-weight: 400;
  158. line-height: 36px;
  159. }
  160. }
  161. .image-content {
  162. max-width: 540px;
  163. display: flex;
  164. align-items: center;
  165. justify-content: center;
  166. :deep(img) {
  167. width: 100%;
  168. height: auto;
  169. }
  170. }
  171. }
  172. .fade-enter-active,
  173. .fade-leave-active {
  174. transition: opacity 0.3s ease;
  175. }
  176. .fade-enter-from,
  177. .fade-leave-to {
  178. opacity: 0;
  179. }
  180. </style>