...
|
...
|
@@ -14,6 +14,7 @@ var $brandHeader = $('#brand-header'), |
|
|
var filter = require('../plugin/filter');
|
|
|
|
|
|
var tip = require('../plugin/tip');
|
|
|
var loading = require('../plugin/loading');
|
|
|
|
|
|
var $goodsContainer = $('#goods-container'),
|
|
|
$ngc = $goodsContainer.children('.new-goods'),
|
...
|
...
|
@@ -40,8 +41,8 @@ var $listNav = $('#list-nav'), |
|
|
navInfo = {
|
|
|
newest: {
|
|
|
order: 1,
|
|
|
reload: false,
|
|
|
page: 1,
|
|
|
reload: true,
|
|
|
page: 0,
|
|
|
end: false
|
|
|
},
|
|
|
price: {
|
...
|
...
|
@@ -72,6 +73,10 @@ function search(opt) { |
|
|
nav, navType,
|
|
|
page;
|
|
|
|
|
|
if (searching) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (opt) {
|
|
|
|
|
|
//筛选项变更则重置reload为true
|
...
|
...
|
@@ -126,10 +131,6 @@ function search(opt) { |
|
|
$.extend(defaultOpt, ext); //扩展筛选项
|
|
|
}
|
|
|
|
|
|
if (searching) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//导航类别
|
|
|
if ($pre.hasClass('new')) {
|
|
|
navType = 'newest';
|
...
|
...
|
@@ -157,6 +158,7 @@ function search(opt) { |
|
|
});
|
|
|
|
|
|
searching = true;
|
|
|
loading.showLoadingMask();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
...
|
...
|
@@ -198,6 +200,7 @@ function search(opt) { |
|
|
nav.page = page;
|
|
|
|
|
|
searching = false;
|
|
|
loading.hideLoadingMask();
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -206,6 +209,7 @@ function search(opt) { |
|
|
lazyLoad($('.lazy'));
|
|
|
|
|
|
filter.registerCbFn(search);
|
|
|
loading.initLoadingMask();
|
|
|
|
|
|
//导航栏点击逻辑说明:
|
|
|
//1.点击非active项时切换active状态
|
...
|
...
|
@@ -356,3 +360,6 @@ $brandHeader.children('.btn-col').bind('tap', function() { |
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
//初始请求最新第一页数据
|
|
|
search(); |
|
|
\ No newline at end of file |
...
|
...
|
|