Authored by 阿达

店铺下拉分页bug fix

... ... @@ -351,20 +351,11 @@ function search(opt) {
opt.url = '/index/search/search';
}
//导航类别
if ($pre.hasClass('new')) {
navType = 'newest';
} else if ($pre.hasClass('price')) {
navType = 'price';
} else if ($pre.hasClass('discount')) {
navType = 'discount';
}
if (opt) {
if (!opt.nextPage) {
//筛选项变更则重置reload为true
for (att in navInfo) {
if (navInfo.hasOwnProperty(att) && navType !== att) {
if (navInfo.hasOwnProperty(att)) {
navInfo[att].reload = true;
}
}
... ... @@ -415,7 +406,14 @@ 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];
page = nav.page + 1;
... ... @@ -626,7 +624,8 @@ $subNav.on('touchend touchcancel', function(e) {
search({
type: 'shop_id',
id: $shopId,
url: '/index/search/search'
url: '/index/search/search',
nextPage: false
});
}
}
... ... @@ -645,7 +644,8 @@ function scrollHandler() {
search({
type: 'shop_id',
id: $shopId,
url: '/index/search/search'
url: '/index/search/search',
nextPage: true
});
}
}
... ... @@ -660,7 +660,8 @@ $(window).scroll(function() {
search({
type: 'shop_id',
id: $shopId,
url: '/index/search/search'
url: '/index/search/search',
nextPage: false
});
$listNav.on('touchstart', 'li', function(e) {
... ...