Authored by 梁志锋

update

@@ -15,7 +15,7 @@ var filter = require('../../plugin/filter'); @@ -15,7 +15,7 @@ var filter = require('../../plugin/filter');
15 var loading = require('../../plugin/loading'); 15 var loading = require('../../plugin/loading');
16 16
17 var $goodsContainer = $('#goods-container'), 17 var $goodsContainer = $('#goods-container'),
18 - $goodsChildren = $goodsContainer.children(); 18 + $goodsChildren = $goodsContainer.children(),
19 $ngc = $($goodsChildren.get(0)), 19 $ngc = $($goodsChildren.get(0)),
20 $pgc = $($goodsChildren.get(1)), 20 $pgc = $($goodsChildren.get(1)),
21 $dgc = $($goodsChildren.get(2)); 21 $dgc = $($goodsChildren.get(2));
@@ -84,6 +84,7 @@ function search(opt) { @@ -84,6 +84,7 @@ function search(opt) {
84 att, 84 att,
85 nav, navType, 85 nav, navType,
86 page; 86 page;
  87 +
87 if (searching) { 88 if (searching) {
88 return; 89 return;
89 } 90 }
@@ -178,7 +179,7 @@ function search(opt) { @@ -178,7 +179,7 @@ function search(opt) {
178 data: setting, 179 data: setting,
179 success: function(data) { 180 success: function(data) {
180 var $container, 181 var $container,
181 - num; 182 + num;
182 183
183 switch (navType) { 184 switch (navType) {
184 case 'newest': 185 case 'newest':
@@ -243,7 +244,6 @@ $.ajax({ @@ -243,7 +244,6 @@ $.ajax({
243 } 244 }
244 }); 245 });
245 lazyLoad($('.lazy')); 246 lazyLoad($('.lazy'));
246 -  
247 247
248 //导航栏点击逻辑说明: 248 //导航栏点击逻辑说明:
249 //1.点击非active项时切换active状态 249 //1.点击非active项时切换active状态
@@ -18,7 +18,10 @@ var filter = require('../../plugin/filter'); @@ -18,7 +18,10 @@ var filter = require('../../plugin/filter');
18 var loading = require('../../plugin/loading'); 18 var loading = require('../../plugin/loading');
19 19
20 var $goodsContainer = $('#goods-container'), 20 var $goodsContainer = $('#goods-container'),
21 - $goodsChildren = $goodsContainer.children(); 21 + $goodsChildren = $goodsContainer.children(),
  22 + $ngc = $($goodsChildren.get(0)),
  23 + $pgc = $($goodsChildren.get(1)).addClass('hide'),
  24 + $dgc = $($goodsChildren.get(2)).addClass('hide');
22 25
23 var winH = $(window).height(), 26 var winH = $(window).height(),
24 noResult = '<p class="no-result">未找到相关搜索结果</p>'; 27 noResult = '<p class="no-result">未找到相关搜索结果</p>';
@@ -65,9 +68,6 @@ var $listNav = $('#list-nav'), @@ -65,9 +68,6 @@ var $listNav = $('#list-nav'),
65 navHammer, 68 navHammer,
66 searching; 69 searching;
67 70
68 -$ngc = $($goodsChildren.get(0)),  
69 -$pgc = $($goodsChildren.get(1)).addClass('hide'),  
70 -$dgc = $($goodsChildren.get(2)).addClass('hide');  
71 $('#today a').text(month + '月' + date + '号'); 71 $('#today a').text(month + '月' + date + '号');
72 72
73 if ($('.swiper-container .swiper-slide').length > 1) { 73 if ($('.swiper-container .swiper-slide').length > 1) {
@@ -205,7 +205,7 @@ function search(opt) { @@ -205,7 +205,7 @@ function search(opt) {
205 data: setting, 205 data: setting,
206 success: function(data) { 206 success: function(data) {
207 var $container, 207 var $container,
208 - num; 208 + num;
209 209
210 switch (navType) { 210 switch (navType) {
211 case 'today': 211 case 'today':
@@ -270,7 +270,7 @@ $.ajax({ @@ -270,7 +270,7 @@ $.ajax({
270 } 270 }
271 }); 271 });
272 lazyLoad($('.lazy')); 272 lazyLoad($('.lazy'));
273 - 273 +
274 //导航栏点击逻辑说明: 274 //导航栏点击逻辑说明:
275 //1.点击非active项时切换active状态 275 //1.点击非active项时切换active状态
276 //2.价格和折扣active状态时继续点击切换排序 276 //2.价格和折扣active状态时继续点击切换排序