Authored by 2586703@qq.com

Merge branch 'feature/h5detail' of http://git.dev.yoho.cn/web/yohobuy-frontend into feature/h5detail

@@ -42,7 +42,8 @@ exports.init = function() { @@ -42,7 +42,8 @@ exports.init = function() {
42 $(document).scroll(function() { 42 $(document).scroll(function() {
43 var sTop = $(this).scrollTop(), 43 var sTop = $(this).scrollTop(),
44 cur, 44 cur,
45 - parent; 45 + parent,
  46 + containerH;
46 thumbContainer.each(function() { 47 thumbContainer.each(function() {
47 var pNode = $(this).closest('.article-type-three'); 48 var pNode = $(this).closest('.article-type-three');
48 if (sTop > pNode.offset().top) { 49 if (sTop > pNode.offset().top) {
@@ -54,7 +55,8 @@ exports.init = function() { @@ -54,7 +55,8 @@ exports.init = function() {
54 } 55 }
55 }); 56 });
56 if (cur) { 57 if (cur) {
57 - if (sTop < parent.offset().top + parent.height()) { 58 + containerH = cur.closest('.thumb-container').outerHeight();
  59 + if (sTop < parent.offset().top + parent.height() - containerH) {
58 cur.addClass('fixed'); 60 cur.addClass('fixed');
59 } else { 61 } else {
60 cur.removeClass('fixed') 62 cur.removeClass('fixed')
1 {{# smallImage}} 1 {{# smallImage}}
2 <div class="article-type-four clearfix"> 2 <div class="article-type-four clearfix">
3 {{# imgs}} 3 {{# imgs}}
4 - <img src="{{src}}" alt="{{alt}}"> 4 + <img class="lazy" src="{{src}}" alt="{{alt}}">
5 {{/ imgs}} 5 {{/ imgs}}
6 </div> 6 </div>
7 {{/ smallImage}} 7 {{/ smallImage}}
1 {{# bigImage}} 1 {{# bigImage}}
2 <div class="article-type-one"> 2 <div class="article-type-one">
3 - <img class="img" src="{{src}}" alt="{{alt}}"> 3 + <img class="img lazy" src="{{src}}" alt="{{alt}}">
4 </div> 4 </div>
5 {{/ bigImage}} 5 {{/ bigImage}}
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <ul class="thumb-container clearfix"> 4 <ul class="thumb-container clearfix">
5 {{# list}} 5 {{# list}}
6 <li class="thumb"> 6 <li class="thumb">
7 - <img class="thumb-img" src="{{thumb}}"> 7 + <img class="thumb-img lazy" src="{{thumb}}">
8 <span class="arrow"></span> 8 <span class="arrow"></span>
9 <span class="clothe-type {{type}}"></span> 9 <span class="clothe-type {{type}}"></span>
10 </li> 10 </li>
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <a class="good-islike iconfont" href="javascript:;">&#xe60f;</a> 7 <a class="good-islike iconfont" href="javascript:;">&#xe60f;</a>
8 {{/ isLike}} 8 {{/ isLike}}
9 <a class="good-thumb" href="{{url}}"> 9 <a class="good-thumb" href="{{url}}">
10 - <img src="{{thumb}}"> 10 + <img class="lazy" src="{{thumb}}">
11 </a> 11 </a>
12 <div class="tag-container"> 12 <div class="tag-container">
13 {{# isNew}} 13 {{# isNew}}
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <ul class="brand-list clearfix"> 3 <ul class="brand-list clearfix">
4 {{# brands}} 4 {{# brands}}
5 <li><a href="{{url}}"> 5 <li><a href="{{url}}">
6 - <img src="{{thumb}}" alt="{{name}}"> 6 + <img class="lazy" src="{{thumb}}" alt="{{name}}">
7 </a></li> 7 </a></li>
8 {{/ brands}} 8 {{/ brands}}
9 </ul> 9 </ul>
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <ul class="post-list"> 3 <ul class="post-list">
4 {{# otherArticle}} 4 {{# otherArticle}}
5 <li><a class="clearfix" href="{{url}}"> 5 <li><a class="clearfix" href="{{url}}">
6 - <img src="{{thumb}}" alt=""> 6 + <img class="lazy" src="{{thumb}}" alt="">
7 <span>{{title}}</span> 7 <span>{{title}}</span>
8 </a></li> 8 </a></li>
9 {{/ otherArticle}} 9 {{/ otherArticle}}