Merge branch 'release/4.4' of http://git.dev.yoho.cn/web/yohobuywap into release/4.4
Showing
1 changed file
with
9 additions
and
4 deletions
@@ -79,8 +79,10 @@ var $listNav = $('#list-nav'), | @@ -79,8 +79,10 @@ var $listNav = $('#list-nav'), | ||
79 | $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 | 79 | $pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项 |
80 | searching; | 80 | searching; |
81 | 81 | ||
82 | -var viewType = 1; // 1-首页,2-上新,3-人气 | 82 | +var viewType = 1;// 1-首页,2-上新,3-人气 |
83 | + | ||
83 | lazyLoad($('img.lazy')); | 84 | lazyLoad($('img.lazy')); |
85 | + | ||
84 | //焦点效果 | 86 | //焦点效果 |
85 | if ($('.banner-swiper').find('li').size() > 1) { | 87 | if ($('.banner-swiper').find('li').size() > 1) { |
86 | bannerSwiper = new Swiper('.banner-swiper', { | 88 | bannerSwiper = new Swiper('.banner-swiper', { |
@@ -140,7 +142,8 @@ function newData(callback) { | @@ -140,7 +142,8 @@ function newData(callback) { | ||
140 | $('#new-arrival').append(data); | 142 | $('#new-arrival').append(data); |
141 | navInfo.new.page++; | 143 | navInfo.new.page++; |
142 | myScroll.refresh(); | 144 | myScroll.refresh(); |
143 | - lazyLoad($('#new-arrival .lazy')); | 145 | + // lazyLoad($('#new-arrival .lazy')); |
146 | + lazyLoad($('#new-arrival').find('.lazy')); | ||
144 | scH = $('#scroller').outerHeight(); | 147 | scH = $('#scroller').outerHeight(); |
145 | searching = false; | 148 | searching = false; |
146 | callback && $.isFunction(callback) && callback(); | 149 | callback && $.isFunction(callback) && callback(); |
@@ -216,6 +219,7 @@ $.jqtab = function(nav, posNav, main) { | @@ -216,6 +219,7 @@ $.jqtab = function(nav, posNav, main) { | ||
216 | }; | 219 | }; |
217 | $.jqtab('#nav', '#pos-nav', '.main'); | 220 | $.jqtab('#nav', '#pos-nav', '.main'); |
218 | $('#wrapper').addClass('scroll-wrapper'); | 221 | $('#wrapper').addClass('scroll-wrapper'); |
222 | + | ||
219 | // lazyLoad($('img.lazy')); | 223 | // lazyLoad($('img.lazy')); |
220 | 224 | ||
221 | myScroll = new IScroll('#wrapper', { | 225 | myScroll = new IScroll('#wrapper', { |
@@ -247,6 +251,7 @@ myScroll.on('scroll', function() { | @@ -247,6 +251,7 @@ myScroll.on('scroll', function() { | ||
247 | break; | 251 | break; |
248 | } | 252 | } |
249 | } | 253 | } |
254 | + | ||
250 | if (sTop < imgH) { | 255 | if (sTop < imgH) { |
251 | if (!$nav1.hasClass('hide')) { | 256 | if (!$nav1.hasClass('hide')) { |
252 | $nav1.addClass('hide'); | 257 | $nav1.addClass('hide'); |
@@ -399,7 +404,6 @@ function search(opt) { | @@ -399,7 +404,6 @@ function search(opt) { | ||
399 | $.extend(defaultOpt, ext); //扩展筛选项 | 404 | $.extend(defaultOpt, ext); //扩展筛选项 |
400 | } | 405 | } |
401 | 406 | ||
402 | - | ||
403 | //导航类别 | 407 | //导航类别 |
404 | if ($pre.hasClass('new')) { | 408 | if ($pre.hasClass('new')) { |
405 | navType = 'newest'; | 409 | navType = 'newest'; |
@@ -412,6 +416,7 @@ function search(opt) { | @@ -412,6 +416,7 @@ function search(opt) { | ||
412 | nav = navInfo[navType]; | 416 | nav = navInfo[navType]; |
413 | 417 | ||
414 | page = nav.page + 1; | 418 | page = nav.page + 1; |
419 | + | ||
415 | if (nav.reload) { | 420 | if (nav.reload) { |
416 | page = 1; | 421 | page = 1; |
417 | } else if (nav.end) { | 422 | } else if (nav.end) { |
@@ -660,7 +665,7 @@ $listNav.on('touchstart', 'li', function(e) { | @@ -660,7 +665,7 @@ $listNav.on('touchstart', 'li', function(e) { | ||
660 | }).on('touchend touchcancel', function() { | 665 | }).on('touchend touchcancel', function() { |
661 | $listNav.find('li').removeClass('bytouch'); | 666 | $listNav.find('li').removeClass('bytouch'); |
662 | myScroll.refresh(); | 667 | myScroll.refresh(); |
663 | - }); | 668 | +}); |
664 | 669 | ||
665 | $posList.on('touchstart', 'li', function(e) { | 670 | $posList.on('touchstart', 'li', function(e) { |
666 | $(this).addClass('bytouch'); | 671 | $(this).addClass('bytouch'); |
-
Please register or login to post a comment