plate3.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class="plate03">
  3. <h1 class="common-title">{{ $t('home.plate2Title') }}<span class="more" @click="$router.push('/cases/全部')">{{$t('common.more')}}></span></h1>
  4. <swiper class="swiper-wrapper" :options="swiperOption">
  5. <swiper-slide
  6. class="swiper-slide"
  7. v-for="(item,i) in list"
  8. :key="i"
  9. >
  10. <div @click="toLink(item)">
  11. <img :src="item.bgImg" alt="">
  12. <h2>{{ item.text }}</h2>
  13. </div>
  14. </swiper-slide>
  15. </swiper>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. data () {
  21. return {
  22. list: [
  23. {
  24. text: '雍正故宫',
  25. bgImg: require('@/assets/images/refactor/home/4case_01@2x.png'),
  26. link: 'https://www.4dkankan.com/showPC.html?m=JPoqsQXL'
  27. },
  28. {
  29. text: '小米有品',
  30. bgImg: require('@/assets/images/refactor/home/4case_02@2x.png'),
  31. link: 'https://www.4dkankan.com/showProPC.html?m=5p1fFyLxv'
  32. },
  33. {
  34. text: '华发依山郡',
  35. bgImg: require('@/assets/images/refactor/home/4case_03@2x.jpg'),
  36. link: 'https://www.4dkankan.com/spc.html?m=t-VJjZMUl'
  37. },
  38. {
  39. text: '万豪酒店',
  40. bgImg: require('@/assets/images/refactor/home/4case_04@2x.jpg'),
  41. link: 'https://www.4dkankan.com/showPC.html?m=PoCGXVFP'
  42. }
  43. ],
  44. swiperOption: {
  45. slidesPerView: 'auto',
  46. autoplay: false,
  47. spaceBetween: 20
  48. }
  49. }
  50. },
  51. methods: {
  52. toLink ({link}) {
  53. window.open(link)
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .plate03 {
  60. margin-top: 55px;
  61. padding: 0 0 0 20px;
  62. .common-title {
  63. margin-bottom: 30px;
  64. }
  65. .swiper-slide {
  66. width: 286px;
  67. position: relative;
  68. img {
  69. width: 100%;
  70. }
  71. h2 {
  72. position: absolute;
  73. top: 57px;
  74. left: 50%;
  75. transform: translateX(-50%);
  76. font-size: 22px;
  77. line-height: 33px;
  78. white-space: nowrap;
  79. }
  80. &:last-child {
  81. margin-right: 20px;
  82. }
  83. }
  84. }
  85. </style>