Authored by 王水玲

单品日

1 <div class="single-day-page yoho-page"> 1 <div class="single-day-page yoho-page">
2 <div class="banner"></div> 2 <div class="banner"></div>
3 - <div class="swiper-tab"></div> 3 + <div class="tab-area">
  4 + <div class="swiper-tab"></div>
  5 + </div>
4 <div class="product-list"></div> 6 <div class="product-list"></div>
5 </div> 7 </div>
@@ -57,12 +57,12 @@ var singleDay = { @@ -57,12 +57,12 @@ var singleDay = {
57 self.previousScrollTop = curScrollTop; 57 self.previousScrollTop = curScrollTop;
58 }; 58 };
59 59
60 - $(window).on('scroll', function() {  
61 - //if ($(window).scrollTop() > self.swiperOTop) {  
62 - // self.$swiper.addClass('fixer');  
63 - //} else {  
64 - // self.$swiper.removeClass('fixer');  
65 - //} 60 + $(window).on('scroll touchmove touchstart touchend', function() {
  61 + if ($(window).scrollTop() > self.swiperOTop) {
  62 + self.$swiper.addClass('fixer');
  63 + } else {
  64 + self.$swiper.removeClass('fixer');
  65 + }
66 66
67 window.requestAnimationFrame(_scrollHandler.bind(self)); 67 window.requestAnimationFrame(_scrollHandler.bind(self));
68 }); 68 });
@@ -16,13 +16,20 @@ @@ -16,13 +16,20 @@
16 z-index: 2; 16 z-index: 2;
17 } 17 }
18 18
19 - .swiper-tab { 19 + .tab-area {
20 width: 100%; 20 width: 100%;
21 height: 86px; 21 height: 86px;
  22 + background: #fff;
22 border-bottom: 1px solid #e0e0e0; 23 border-bottom: 1px solid #e0e0e0;
23 border-top: 1px solid #e0e0e0; 24 border-top: 1px solid #e0e0e0;
24 - background: #fff;  
25 - box-sizing: border-box; 25 + }
  26 +
  27 + .swiper-tab {
  28 + width: 100%;
  29 + height: 80px;
  30 + //border-bottom: 1px solid #e0e0e0;
  31 + //border-top: 1px solid #e0e0e0;
  32 + //background: #fff;
26 33
27 li { 34 li {
28 float: left; 35 float: left;