index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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(`comments["${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/avatar_1.jpg" alt="" v-if="i == 0" />
  18. <img src="@/public/images/avatar/avatar_2.jpg" alt="" v-if="i == 1" />
  19. <img src="@/public/images/avatar/avatar_3.jpg" alt="" v-if="i == 2" />
  20. <img src="@/public/images/avatar/avatar_4.jpg" alt="" v-if="i == 3" />
  21. <img src="@/public/images/avatar/avatar_5.jpg" alt="" v-if="i == 4" />
  22. <img src="@/public/images/avatar/avatar_6.jpg" alt="" v-if="i == 5" />
  23. <img src="@/public/images/avatar/avatar_7.jpg" alt="" v-if="i == 6" />
  24. <img src="@/public/images/avatar/avatar_8.jpg" alt="" v-if="i == 7" />
  25. <img src="@/public/images/avatar/avatar_9.jpg" alt="" v-if="i == 8" />
  26. <img src="@/public/images/avatar/avatar_10.jpg" alt="" v-if="i == 9" />
  27. <img src="@/public/images/avatar/avatar_11.jpg" alt="" v-if="i == 10" />
  28. <img src="../../../../public/images/logo_icon.png" />
  29. </div>
  30. <div>
  31. <div class="swiper-slide__card-name">{{ $t(`comments["${item.name}"]`) }}</div>
  32. <div class="swiper-slide__card-desc">{{ $t(`comments["${item.address}"]`) }}</div>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="swiper-button-prev"></div>
  38. <div class="swiper-button-next"></div>
  39. </div>
  40. </div>
  41. </section>
  42. </template>
  43. <script setup lang="ts">
  44. import { onMounted } from 'vue'
  45. import Swiper from 'swiper'
  46. onMounted(() => {
  47. new Swiper('.mySwiper', {
  48. speed: 600,
  49. loop: true,
  50. slidesPerView: 'auto',
  51. centeredSlides: true,
  52. autoplay: {
  53. delay: 1500,
  54. disableOnInteraction: false,
  55. stopOnLastSlide: false,
  56. },
  57. navigation: {
  58. nextEl: '.swiper-button-next',
  59. prevEl: '.swiper-button-prev',
  60. },
  61. })
  62. })
  63. const dataList = [
  64. {
  65. name: '马库斯',
  66. address: '奥地利',
  67. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  68. content: '商品易于使用,质量很棒。物流给力,包装精美,客服态度热情!',
  69. },
  70. {
  71. name: '劳伦斯',
  72. address: '新西兰',
  73. avatar: ['../../../../public/images/icons/xinxilan_logo_icon.png'],
  74. content: '如果你想买其他东西,没有比 VAVABUY 更好的了',
  75. locale: '',
  76. },
  77. {
  78. name: '皮埃尔',
  79. address: '法国',
  80. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  81. content: '飞快送达,包装妥帖,商品完美。会再来光顾的!',
  82. },
  83. {
  84. name: '约翰',
  85. address: '澳大利亚',
  86. avatar: ['../../../../public/images/icons/aodaliya_logo_icon.png'],
  87. content: '太棒了!一切都很顺利,接收订单并快速发货的速度让人印象深刻',
  88. },
  89. {
  90. name: '安娜',
  91. address: '意大利',
  92. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  93. content: '非常易于使用,包装很精美,会收获很多惊喜',
  94. },
  95. {
  96. name: '杰森',
  97. address: '英国',
  98. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  99. content: '国际物流送货上门太赞了!商品没瑕疵,包装抗摔,全程追踪清晰~',
  100. },
  101. {
  102. name: '伊莎贝拉',
  103. address: '西班牙',
  104. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  105. content: '这商品太好用了,操作简单。国际物流全程顺畅,包装精美又牢固!',
  106. },
  107. {
  108. name: '杰克',
  109. address: '美国',
  110. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  111. content: '到货比想的快,包装抗造,东西超棒。',
  112. },
  113. {
  114. name: '埃里克',
  115. address: '瑞典',
  116. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  117. content: '商品易于使用,完全满足需求。物流比预期快,客服响应迅速,体验非常好!',
  118. },
  119. {
  120. name: '亚历山德罗',
  121. address: '意大利',
  122. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  123. content: '清关过程很顺利,物流速度很快。包装处理得很棒,连说明书都套了保护袋!',
  124. },
  125. {
  126. name: '卢卡',
  127. address: '意大利',
  128. avatar: ['../../../../public/images/icons/yidali_logo_icon.png'],
  129. content: '物流全程透明,从出库到派送都能看到。包装很结实,拆开后商品崭新如初!',
  130. },
  131. ]
  132. </script>
  133. <style lang="less" scoped>
  134. .wrap__five {
  135. display: flex;
  136. flex-direction: column;
  137. align-items: center;
  138. width: 100%;
  139. height: auto;
  140. padding: 50px 15px;
  141. padding: 3.125rem 0.9375rem;
  142. .wrap__five-head {
  143. margin-bottom: 40px;
  144. margin-bottom: 2.5rem;
  145. text-align: center;
  146. }
  147. .wrap__five-title {
  148. font-family: Source Han Sans;
  149. font-size: 30px;
  150. font-size: 1.875rem;
  151. font-weight: bold;
  152. color: #000000;
  153. }
  154. .wrap__five-box {
  155. display: inline-block;
  156. width: auto;
  157. max-width: 1024px;
  158. max-width: 64rem;
  159. }
  160. .mySwiper {
  161. overflow: hidden;
  162. width: 100%;
  163. position: relative;
  164. padding: 0 60px;
  165. padding: 0 3.75rem;
  166. .swiper-wrapper {
  167. }
  168. .swiper-button-next,
  169. .swiper-button-prev {
  170. color: #adb5bd;
  171. opacity: 1;
  172. }
  173. .swiper-button-next:after,
  174. .swiper-button-prev:after {
  175. font-size: 38px;
  176. font-size: 2.375rem;
  177. font-weight: 300;
  178. }
  179. .swiper-slide {
  180. display: flex;
  181. flex-direction: column;
  182. justify-content: space-between;
  183. width: 275px;
  184. width: 17.1875rem;
  185. height: 275px;
  186. height: 17.1875rem;
  187. padding: 22px;
  188. padding: 1.375rem;
  189. margin-left: 28px;
  190. margin-left: 1.75rem;
  191. border-radius: 12px;
  192. border-radius: 0.75rem;
  193. background: #f5f5f5;
  194. border: 1px solid #cccccc;
  195. box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
  196. }
  197. .swiper-slide:first-child {
  198. margin-left: 0;
  199. }
  200. .swiper-slide__card-content {
  201. text-align: center;
  202. font-family: Source Han Sans;
  203. font-size: 15px;
  204. font-size: 0.9375rem;
  205. color: #4b5563;
  206. }
  207. .swiper-slide__card-body {
  208. display: flex;
  209. align-items: center;
  210. justify-content: center;
  211. }
  212. .swiper-slide__card-avatar {
  213. position: relative;
  214. width: 100px;
  215. width: 6.25rem;
  216. }
  217. .swiper-slide__card-avatar img {
  218. width: 56px;
  219. width: 3.5rem;
  220. height: 56px;
  221. height: 3.5rem;
  222. border-radius: 50%;
  223. position: relative;
  224. z-index: 1;
  225. }
  226. .swiper-slide__card-avatar img:nth-child(1) {
  227. box-sizing: content-box;
  228. border: 3px solid #fff;
  229. }
  230. .swiper-slide__card-avatar img:nth-child(2) {
  231. position: absolute;
  232. left: 30px;
  233. left: 1.875rem;
  234. top: 50%;
  235. transform: translateY(-50%);
  236. z-index: 0;
  237. }
  238. .swiper-slide__card-name {
  239. font-family: Source Han Sans;
  240. font-size: 14px;
  241. font-size: 0.875rem;
  242. color: #3d3d3d;
  243. }
  244. .swiper-slide__card-desc {
  245. font-family: Source Han Sans;
  246. font-size: 12px;
  247. font-size: 0.75rem;
  248. color: #4b5563;
  249. }
  250. }
  251. }
  252. </style>
  253. <style lang="less" scoped>
  254. @import url(./css/styles@1200.less);
  255. @import url(./css/styles@1024.less);
  256. @import url(./css/styles@768.less);
  257. @import url(./css/styles@412.less);
  258. </style>