Authored by 郝肖肖

Merge branch 'release/wap-optim' of git.yoho.cn:fe/yohobuywap-node into release/wap-optim

... ... @@ -49,6 +49,8 @@
</div>
</div>
{{/ brandHome}}
<!-- 优惠卷 -->
<div class="coupon-group"></div>
<!-- /品牌页面 -->
<ul id="list-nav" class="list-nav clearfix">
<li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
... ... @@ -103,4 +105,4 @@
{{> common/query-param}} {{> common/suspend-cart}} {{/ goodList}}
<input type="text" class="domain" style="display:none" value={{domain}}>
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -27,6 +27,8 @@
</div>
<input type="hidden" name="app_version" value="{{appVersion}}">
{{/ baseShopHome}}
<!-- 优惠卷 -->
<div class="coupon-group"></div>
<!-- /基础店铺页面 -->
<ul id="list-nav" class="list-nav clearfix">
<li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
... ... @@ -81,4 +83,4 @@
{{> common/query-param}} {{> common/suspend-cart}} {{/ goodList}}
<input type="text" class="shopId" style="display:none" value={{shopId}}>
</div>
\ No newline at end of file
</div>
... ...
... ... @@ -652,7 +652,9 @@ function search(opt, callback) {
// reNav1Pos();
bindGoodThumbClick();
callback && callback();
setTimeout(function() {
callback && callback();
}, 0)
},
error: function() {
tip.show('网络断开连接了~');
... ... @@ -831,7 +833,27 @@ $subNav.on('touchend touchcancel', function(e) {
}
nav = navInfo[navType];
var reloadCb = function() {
$goodsContainer.children('.container:not(.hide)').addClass('hide');
switch (navType) {
case 'newest':
$ngc.removeClass('hide');
break;
case 'price':
$pgc.removeClass('hide');
break;
case 'discount':
$dgc.removeClass('hide');
break;
case 'default':
$defaultgc.removeClass('hide');
break;
default:
break;
}
}
if ($this.hasClass('active')) {
// 最新无排序切换
... ... @@ -847,27 +869,6 @@ $subNav.on('touchend touchcancel', function(e) {
nav.reload = true; // 重置reload,HTML会被替换为逆序的HTML
nav.order = nav.order === 0 ? 1 : 0; // 切换排序
$goodsContainer.children('.container:not(.hide)').addClass('hide');
switch (navType) {
case 'newest':
$ngc.removeClass('hide');
break;
case 'price':
$pgc.removeClass('hide');
break;
case 'discount':
$dgc.removeClass('hide');
break;
case 'default':
$defaultgc.removeClass('hide');
break;
default:
break;
}
}
} else {
$active = $subNav.find('.active');
... ... @@ -876,31 +877,7 @@ $subNav.on('touchend touchcancel', function(e) {
// 若之前active项为筛选,则隐藏筛选面板
filter.hideFilter();
} else {
// 切换container显示
$goodsContainer.children('.container:not(.hide)').addClass('hide');
switch (navType) {
case 'newest':
$ngc.removeClass('hide');
break;
case 'price':
$pgc.removeClass('hide');
break;
case 'discount':
$dgc.removeClass('hide');
break;
case 'default':
$defaultgc.removeClass('hide');
break;
default:
break;
}
}
}
$subNav.children().removeClass('active');
$subNav.find(cname).addClass('active');
}
... ... @@ -913,8 +890,7 @@ $subNav.on('touchend touchcancel', function(e) {
appVersion: appVersion,
url: '/product/search/search',
nextPage: false
}, function() {
});
}, reloadCb);
}
}
e.stopPropagation();
... ...