...
|
...
|
@@ -350,11 +350,20 @@ function search(opt) { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
//导航类别
|
|
|
if ($pre.hasClass('new')) {
|
|
|
navType = 'newest';
|
|
|
} else if ($pre.hasClass('price')) {
|
|
|
navType = 'price';
|
|
|
} else if ($pre.hasClass('discount')) {
|
|
|
navType = 'discount';
|
|
|
}
|
|
|
|
|
|
if (opt) {
|
|
|
|
|
|
//筛选项变更则重置reload为true
|
|
|
for (att in navInfo) {
|
|
|
if (navInfo.hasOwnProperty(att)) {
|
|
|
if (navInfo.hasOwnProperty(att) && navType !== att) {
|
|
|
navInfo[att].reload = true;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -405,14 +414,6 @@ function search(opt) { |
|
|
$.extend(defaultOpt, ext); //扩展筛选项
|
|
|
}
|
|
|
|
|
|
//导航类别
|
|
|
if ($pre.hasClass('new')) {
|
|
|
navType = 'newest';
|
|
|
} else if ($pre.hasClass('price')) {
|
|
|
navType = 'price';
|
|
|
} else if ($pre.hasClass('discount')) {
|
|
|
navType = 'discount';
|
|
|
}
|
|
|
|
|
|
nav = navInfo[navType];
|
|
|
|
...
|
...
|
@@ -634,6 +635,8 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
|
|
|
function scrollHandler() {
|
|
|
|
|
|
sTop = -myScroll.y;
|
|
|
|
|
|
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
|
|
|
myScroll && myScroll.refresh();
|
|
|
if (sTop + winH > $('#scroller').height() - 0.25 * $goodsContainer.height() - 50) {
|
...
|
...
|
@@ -770,7 +773,6 @@ function cancelShop() { |
|
|
|
|
|
$('#collect').on('touchstart', function(e) {
|
|
|
if ($('#collect').hasClass('alreadyCollect')) {
|
|
|
console.log(1)
|
|
|
cancelShop();
|
|
|
} else {
|
|
|
collectShop();
|
...
|
...
|
|