Authored by lijing

资源位滚动图

@@ -12,6 +12,8 @@ var $userAvatar = $('.user-avatar'), @@ -12,6 +12,8 @@ var $userAvatar = $('.user-avatar'),
12 var myImage = new Image(), 12 var myImage = new Image(),
13 avatar; 13 avatar;
14 14
  15 +var Swiper = require('yoho-swiper');
  16 +
15 require('home/index.page.css'); 17 require('home/index.page.css');
16 18
17 require('../common'); 19 require('../common');
@@ -21,6 +23,15 @@ if ($('.recommend-for-you').length) { @@ -21,6 +23,15 @@ if ($('.recommend-for-you').length) {
21 require('../common/suspend-cart'); 23 require('../common/suspend-cart');
22 require('../common/footer'); 24 require('../common/footer');
23 25
  26 +new Swiper('.banner-center-swiper', {
  27 + pagination: '.swiper-pagination',
  28 + lazyLoading: true,
  29 + lazyLoadingInPrevNext: true,
  30 + paginationClickable: true,
  31 + loop: true,
  32 + autoplay: 3000
  33 +});
  34 +
24 window.reMarginFooter('.footer-tab'); 35 window.reMarginFooter('.footer-tab');
25 36
26 // 部分老用户没有头像,显示默认头像 37 // 部分老用户没有头像,显示默认头像
@@ -329,4 +329,31 @@ @@ -329,4 +329,31 @@
329 padding-top: 0; 329 padding-top: 0;
330 } 330 }
331 } 331 }
  332 +
  333 + .banner-center-swiper {
  334 + position: relative;
  335 + z-index: 1;
  336 + overflow: hidden;
  337 + margin: 0 auto;
  338 +
  339 + img {
  340 + width: 750px;
  341 + height: 234px;
  342 + }
  343 +
  344 + .swiper-pagination-bullet {
  345 + display: inline-block;
  346 + width: 0.35rem;
  347 + height: 0.35rem;
  348 + background: #fff;
  349 + opacity: 0.5;
  350 + margin: 0 0.225rem;
  351 + border-radius: 50%;
  352 + }
  353 +
  354 + .swiper-pagination-bullet-active {
  355 + background: #fff;
  356 + opacity: 1;
  357 + }
  358 + }
332 } 359 }
@@ -4,3 +4,4 @@ @@ -4,3 +4,4 @@
4 @import "channel/footer-tab"; 4 @import "channel/footer-tab";
5 @import "channel/thumb-row"; 5 @import "channel/thumb-row";
6 @import "channel/divide-image"; 6 @import "channel/divide-image";
  7 +@import "layout/swiper";