1. <section class="h_custom_data wyj_zdy_wrap" templetid="28150057" data-title="双12大牌页面-v20211128"
    2. edit-time="2021-11-28 15:00:57" code-author="wangyongjie">
    3. <link rel="stylesheet"
    4. href="https://prom.m.gome.com.cn/html/prodhtml/channel/resource/4530/8890709744/swiper.min.css">
    5. <script
    6. src="https://prom.m.gome.com.cn/html/prodhtml/channel/resource/4530/6288084257/wyj_custom_price.js"></script>
    7. <style>
    8. .wyj_dp_djdj {
    9. display: block;
    10. width: 7.5rem;
    11. height: 3.0467rem;
    12. }
    13. .wyj_dp_djdj .swiper-slide {
    14. width: 7.1rem;
    15. height: 3.0467rem;
    16. background-size: 100% 100%;
    17. }
    18. .swiper-container-horizontal-wzj>.swiper-pagination-bullets,
    19. .swiper-pagination-custom,
    20. .swiper-pagination-fraction {
    21. bottom: 0.2rem;
    22. left: -0.16rem;
    23. width: 100%;
    24. top: 2.35rem;
    25. }
    26. .wyj_dp_djdj .swiper-slide>div {
    27. width: 87%;
    28. height: 100%;
    29. background-size: 100% 100%;
    30. margin-left: 0.32rem;
    31. }
    32. .wyj_dp_djdj a {
    33. display: block;
    34. width: 100%;
    35. height: 100%;
    36. }
    37. .wyj_dp_djdj .swiper-pagination-bullet {
    38. background-color: transparent;
    39. border: .01rem solid #764EA2;
    40. opacity: 1
    41. }
    42. .wyj_dp_djdj span.swiper-pagination-bullet.swiper-pagination-bullet-active {
    43. background-color: #764EA2 !important;
    44. }
    45. </style>
    46. <div class="swiper-container wyj_dp_djdj swiper-container-initialized swiper-container-horizontal-wzj">
    47. <div class="swiper-wrapper">
    48. <div class="swiper-slide">
    49. <div style="background-image:url(https://gfs7.gomein.net.cn/wireless/T11RYkBsJT1RCvBVdK_950_471.png);">
    50. <a href="https://item.m.gome.com.cn/p-pop8016768348.html"></a>
    51. </div>
    52. </div>
    53. <div class="swiper-slide">
    54. <div style="background-image:url(https://gfs5.gomein.net.cn/wireless/T1VzdkBCAT1RCvBVdK_950_471.png);">
    55. <a href="https://item.m.gome.com.cn/p-pop8016898401.html"></a>
    56. </div>
    57. </div>
    58. <div class="swiper-slide">
    59. <div style="background-image:url(https://gfs8.gomein.net.cn/wireless/T1izdkB4WT1RCvBVdK_950_471.png);">
    60. <a href="https://item.m.gome.com.cn/p-pop8016824571.html"></a>
    61. </div>
    62. </div>
    63. <div class="swiper-slide">
    64. <div style="background-image:url(https://gfs7.gomein.net.cn/wireless/T1.FYkB4YT1RCvBVdK_950_471.png);">
    65. <a href="https://item.m.gome.com.cn/p-pop8016926678.html"></a>
    66. </div>
    67. </div>
    68. </div>
    69. <div class="swiper-pagination swiper-pagination-bullets-wzj"><span
    70. class="swiper-pagination-bullet swiper-pagination-bullet-active"></span><span
    71. class="swiper-pagination-bullet"></span><span class="swiper-pagination-bullet"></span></div>
    72. <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
    73. </div>
    74. <script>
    75. var swiperJs = document.createElement("script");
    76. swiperJs.src = "https://prom.m.gome.com.cn/html/prodhtml/channel/resource/4530/8890709744/swiper.min.js";
    77. document.body.appendChild(swiperJs);
    78. swiperJs.onload = function () {
    79. var wyj_dp_swiper = new Swiper('.wyj_dp_djdj', {
    80. watchSlidesProgress: true,
    81. resistanceRatio: 0,
    82. loop: true,
    83. centeredSlides: true,
    84. loopAdditionalSlides: 300,
    85. speed: 1000,
    86. pagination: {
    87. el: '.swiper-pagination',
    88. },
    89. autoplay: {
    90. delay: 2200,
    91. disableOnInteraction: false,
    92. },
    93. on: {
    94. init: function () {
    95. slides = this.slides
    96. for (i = 0; i < slides.length; i++) {
    97. slide = slides.eq(i)
    98. slide.css('zIndex', 100 - i);
    99. }
    100. },
    101. resize: function (swiper) {
    102. swiper.update()
    103. },
    104. setTranslate: function () {
    105. slides = this.slides
    106. offsetAfter = this.width * .96
    107. for (i = 0; i < slides.length; i++) {
    108. slide = slides.eq(i)
    109. progress = slides[i].progress
    110. if (progress <= 0) {
    111. slide.transform('translate3d(' + (progress) * offsetAfter + 'px, 0, 0) scale(' + (1 - Math.abs(progress) / 20) + ')');
    112. slide.css('opacity', (progress + 4));
    113. }
    114. if (progress > 0) {
    115. slide.css('opacity', 1 - progress);
    116. }
    117. }
    118. },
    119. setTransition: function (swiper, transition) {
    120. for (var i = 0; i < this.slides.length; i++) {
    121. var slide = this.slides.eq(i)
    122. slide.transition(transition);
    123. }
    124. },
    125. },
    126. });
    127. }
    128. </script>
    129. </section>
    130. <script src="https://prom.m.gome.com.cn/html/prodhtml/channel/resource/4530/8890709744/swiper.min.js"></script>