Merge branch 'release/wap-optim' of http://git.yoho.cn/fe/yohobuywap-node into release/wap-optim
Showing
1 changed file
with
22 additions
and
19 deletions
| @@ -755,26 +755,27 @@ if ($brandHeader.data('isbaseshop') === true) { | @@ -755,26 +755,27 @@ if ($brandHeader.data('isbaseshop') === true) { | ||
| 755 | } | 755 | } |
| 756 | 756 | ||
| 757 | $.extend(defaultOpt, pars); | 757 | $.extend(defaultOpt, pars); |
| 758 | + setTimeout(function() { | ||
| 759 | + $.ajax({ | ||
| 760 | + type: 'GET', | ||
| 761 | + url: location.protocol + '//m.yohobuy.com/product/search/filter', | ||
| 762 | + data: defaultOpt, | ||
| 763 | + success: function(data) { | ||
| 764 | + $goodsContainer.append(data); | ||
| 758 | 765 | ||
| 759 | - $.ajax({ | ||
| 760 | - type: 'GET', | ||
| 761 | - url: location.protocol + '//m.yohobuy.com/product/search/filter', | ||
| 762 | - data: defaultOpt, | ||
| 763 | - success: function(data) { | ||
| 764 | - $goodsContainer.append(data); | ||
| 765 | - | ||
| 766 | - // 初始化filter&注册filter回调 | ||
| 767 | - filter.initFilter({ | ||
| 768 | - fCbFn: search, | ||
| 769 | - hCbFn: function() { | 766 | + // 初始化filter&注册filter回调 |
| 767 | + filter.initFilter({ | ||
| 768 | + fCbFn: search, | ||
| 769 | + hCbFn: function() { | ||
| 770 | 770 | ||
| 771 | - // 切换active状态到$pre上 | ||
| 772 | - $pre.addClass('active'); | ||
| 773 | - $pre.siblings('.filter').removeClass('active'); | ||
| 774 | - } | ||
| 775 | - }); | ||
| 776 | - } | ||
| 777 | - }); | 771 | + // 切换active状态到$pre上 |
| 772 | + $pre.addClass('active'); | ||
| 773 | + $pre.siblings('.filter').removeClass('active'); | ||
| 774 | + } | ||
| 775 | + }); | ||
| 776 | + } | ||
| 777 | + }); | ||
| 778 | + }, 500); | ||
| 778 | }()); | 779 | }()); |
| 779 | 780 | ||
| 780 | 781 | ||
| @@ -1075,7 +1076,9 @@ if ($brandHeader.length > 0) { | @@ -1075,7 +1076,9 @@ if ($brandHeader.length > 0) { | ||
| 1075 | } | 1076 | } |
| 1076 | 1077 | ||
| 1077 | // 初始请求最新第一页数据 | 1078 | // 初始请求最新第一页数据 |
| 1078 | -search(); | 1079 | +setTimeout(function() { |
| 1080 | + search(); | ||
| 1081 | +}, 500); | ||
| 1079 | 1082 | ||
| 1080 | $listNav.on('touchstart', 'li', function() { | 1083 | $listNav.on('touchstart', 'li', function() { |
| 1081 | $listNav.find('li').removeClass('bytouch'); | 1084 | $listNav.find('li').removeClass('bytouch'); |
-
Please register or login to post a comment