index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <section class="wrap__five">
  3. <div class="wrap__five-head">
  4. <div class="wrap__five-title">
  5. <span>{{ $t('system["深受全球购物者的喜爱"]') }}</span>
  6. </div>
  7. </div>
  8. <div class="wrap__five-box">
  9. <div class="swiper mySwiper">
  10. <div class="swiper-wrapper">
  11. <div v-for="(item, i) in dataList" :key="i" class="swiper-slide swiper-slide__card">
  12. <div class="swiper-slide__card-head">
  13. <div class="swiper-slide__card-content">{{ $t(`paragraph["${item.content}"]`) }}</div>
  14. </div>
  15. <div class="swiper-slide__card-body">
  16. <div class="swiper-slide__card-avatar">
  17. <img src="@/public/images/avatar_1.jpg" alt="" v-if="i == 0" />
  18. <img src="@/public/images/avatar_3.jpg" alt="" v-if="i == 1" />
  19. <img src="@/public/images/avatar_4.jpg" alt="" v-if="i == 2" />
  20. <img src="../../../../public/images/logo_icon.png" />
  21. <!-- <img src="../../../../public/images/icons/xinxilan_logo_icon.png" v-if="i == 0" />
  22. <img src="../../../../public/images/icons/aodaliya_logo_icon.png" v-if="i == 1" />
  23. <img src="../../../../public/images/icons/yidali_logo_icon.png" v-if="i == 2" /> -->
  24. </div>
  25. <div>
  26. <div class="swiper-slide__card-name">{{ $t(`system["${item.name}"]`) }}</div>
  27. <div class="swiper-slide__card-desc">{{ $t(`system["${item.address}"]`) }}</div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="swiper-button-prev"></div>
  33. <div class="swiper-button-next"></div>
  34. </div>
  35. </div>
  36. </section>
  37. </template>
  38. <script setup lang="ts">
  39. import { onMounted } from 'vue'
  40. import Swiper from 'swiper'
  41. onMounted(() => {
  42. new Swiper('.mySwiper', {
  43. speed: 600,
  44. // loop: true,
  45. slidesPerView: 'auto',
  46. // centeredSlides: true,
  47. navigation: {
  48. nextEl: '.swiper-button-next',
  49. prevEl: '.swiper-button-prev',
  50. },
  51. })
  52. })
  53. const dataList = [
  54. {
  55. name: 'Lawrence',
  56. address: '新西兰',
  57. avatar: ['../../../../public/images/icons/xinxilan_logo_icon.png'],
  58. content: '如果你想买其他东西,没有比 Vava buy 更好的了',
  59. locale: '',
  60. },
  61. {
  62. name: 'John',
  63. address: '澳大利亚',
  64. avatar: ['../../../../public/images/icons/aodaliya_logo_icon.png'],
  65. content: '太棒了!一切都很顺利,接收订单并快速发货的速度让人印象深刻',
  66. },
  67. {
  68. name: 'Anna',
  69. address: '意大利',
  70. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  71. content: '非常易于使用,包装很精美,会收获很多惊喜',
  72. },
  73. ]
  74. </script>
  75. <style lang="less" scoped>
  76. .wrap__five {
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. width: 100%;
  81. height: auto;
  82. padding: 50px 15px;
  83. padding: 3.125rem 0.9375rem;
  84. .wrap__five-head {
  85. margin-bottom: 40px;
  86. margin-bottom: 2.5rem;
  87. text-align: center;
  88. }
  89. .wrap__five-title {
  90. font-family: Source Han Sans;
  91. font-size: 30px;
  92. font-size: 1.875rem;
  93. font-weight: bold;
  94. color: #000000;
  95. }
  96. .wrap__five-box {
  97. display: inline-block;
  98. width: auto;
  99. max-width: 1400px;
  100. max-width: 87.5rem;
  101. }
  102. .mySwiper {
  103. overflow: hidden;
  104. width: 100%;
  105. position: relative;
  106. padding: 0 60px;
  107. padding: 0 3.75rem;
  108. .swiper-wrapper {
  109. }
  110. .swiper-button-next,
  111. .swiper-button-prev {
  112. color: #adb5bd;
  113. opacity: 1;
  114. }
  115. .swiper-button-next:after,
  116. .swiper-button-prev:after {
  117. font-size: 38px;
  118. font-size: 2.375rem;
  119. font-weight: 300;
  120. }
  121. .swiper-slide {
  122. display: flex;
  123. flex-direction: column;
  124. justify-content: space-between;
  125. width: 275px;
  126. width: 17.1875rem;
  127. height: 275px;
  128. height: 17.1875rem;
  129. padding: 22px;
  130. padding: 1.375rem;
  131. margin-left: 28px;
  132. margin-left: 1.75rem;
  133. border-radius: 12px;
  134. border-radius: 0.75rem;
  135. background: #f5f5f5;
  136. border: 1px solid #cccccc;
  137. box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
  138. }
  139. .swiper-slide:first-child {
  140. margin-left: 0;
  141. }
  142. .swiper-slide__card-content {
  143. text-align: center;
  144. font-family: Source Han Sans;
  145. font-size: 15px;
  146. font-size: 0.9375rem;
  147. color: #4b5563;
  148. }
  149. .swiper-slide__card-body {
  150. display: flex;
  151. align-items: center;
  152. justify-content: center;
  153. }
  154. .swiper-slide__card-avatar {
  155. position: relative;
  156. width: 100px;
  157. width: 6.25rem;
  158. }
  159. .swiper-slide__card-avatar img {
  160. width: 56px;
  161. width: 3.5rem;
  162. height: 56px;
  163. height: 3.5rem;
  164. border-radius: 50%;
  165. position: relative;
  166. z-index: 1;
  167. }
  168. .swiper-slide__card-avatar img:nth-child(1) {
  169. box-sizing: content-box;
  170. border: 3px solid #fff;
  171. }
  172. .swiper-slide__card-avatar img:nth-child(2) {
  173. position: absolute;
  174. left: 30px;
  175. left: 1.875rem;
  176. top: 50%;
  177. transform: translateY(-50%);
  178. z-index: 0;
  179. }
  180. .swiper-slide__card-name {
  181. font-family: Source Han Sans;
  182. font-size: 14px;
  183. font-size: 0.875rem;
  184. color: #3d3d3d;
  185. }
  186. .swiper-slide__card-desc {
  187. font-family: Source Han Sans;
  188. font-size: 12px;
  189. font-size: 0.75rem;
  190. color: #4b5563;
  191. }
  192. }
  193. }
  194. </style>
  195. <style lang="less" scoped>
  196. @import url(./css/styles@1200.less);
  197. @import url(./css/styles@1024.less);
  198. @import url(./css/styles@768.less);
  199. @import url(./css/styles@412.less);
  200. </style>