CaseCard.vue 5.7 KB

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