Authored by 郝肖肖

经典店铺默认 order 参数不传

... ... @@ -119,7 +119,7 @@
<div class="discount-area first" id="navlist2">
<ul id="list-nav" class="home-sub-nav list-nav pos-list clearfix">
<li class="sdefault active buriedpoint first-li-more" data-bp-id="shop_listnav_sdefault_1">
<li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
<a href="javascript:void(0);">
<span class="nav-txt">默认</span>
<span class="iconfont up cur hide">&#xe615;</span>
... ... @@ -153,7 +153,7 @@
</ul>
<div class='new-list classics hide'>
<ul>
<li class='active sdefault' data-bp-id='shop_listnav_sdefault_1'>默认</li>
<li class='active default' data-bp-id='shop_listnav_default_1'>默认</li>
<li class='new' data-bp-id='shop_listnav_new_1'>最新</li>
</ul>
</div>
... ... @@ -161,7 +161,7 @@
<div class="discount-area first">
<div id="goods-container" class="goods-container">
<div class="sdefault-goods container clearfix">
<div class="default-goods container clearfix">
{{#newGoods}}
{{> common/goods}}
{{/newGoods}}</div>
... ... @@ -189,7 +189,7 @@
</ul>
<ul id="pos-list" class="home-sub-nav pos-list hide">
<li class="sdefault active buriedpoint first-li-more" data-bp-id="shop_listnav_sdefault_1">
<li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
<a href="javascript:void(0);">
<span class="nav-txt">默认</span>
<span class="iconfont up cur hide">&#xe615;</span>
... ...
... ... @@ -30,7 +30,7 @@ var $subNav = $('.home-sub-nav'),
$collect = $('#collect'),
$goodsContainer = $('#goods-container'),
$goodsChildren = $goodsContainer.children(),
$sdefaultgc = $goodsContainer.children('.sdefault-goods'),
$defaultgc = $goodsContainer.children('.default-goods'),
$ngc = $($goodsChildren.get(0)),
$pgc = $($goodsChildren.get(1)),
$dgc = $($goodsChildren.get(2)),
... ... @@ -112,7 +112,7 @@ var defaultOpt = require('../common/query-param');
url: '/product/search/filter',
data: {
shop_id: $('.shopId').val(),
type: 'sdefault',
type: 'default',
order: '0',
channel: defaultOpt.channel
},
... ... @@ -149,7 +149,7 @@ var $listNav = $('#list-nav'),
page: 1,
end: false
},
sdefault: {
default: {
order: 0,
reload: true,
page: 1,
... ... @@ -575,8 +575,8 @@ function search(opt, callback) {
navType = 'price';
} else if ($pre.hasClass('discount')) {
navType = 'discount';
} else if ($pre.hasClass('sdefault')) {
navType = 'sdefault';
} else if ($pre.hasClass('default')) {
navType = 'default';
}
nav = navInfo[navType];
... ... @@ -629,8 +629,8 @@ function search(opt, callback) {
case 'discount':
$container = $dgc;
break;
case 'sdefault':
$container = $sdefaultgc;
case 'default':
$container = $defaultgc;
break;
default:
break;
... ... @@ -704,9 +704,9 @@ $newList.on('touchstart', 'li', function(e) {
if ($(this).hasClass('new')) {
navType = 'newest';
cls = 'new';
} else if ($(this).hasClass('sdefault')) {
navType = 'sdefault';
cls = 'sdefault';
} else if ($(this).hasClass('default')) {
navType = 'default';
cls = 'default';
} else if ($(this).hasClass('sale')) {
navType = 'sale';
cls = 'sale';
... ... @@ -716,7 +716,7 @@ $newList.on('touchstart', 'li', function(e) {
$('#pos-list').addClass('hide');
$firstLiDom.find('.nav-txt').text($(this).text());
$firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
$subNav.find('.first-li-more').removeClass('new sdefault sale').addClass(cls);
$subNav.find('.first-li-more').removeClass('new default sale').addClass(cls);
$(document).trigger('shouldSendBpData', [bpIdData]);
newListHide();
... ... @@ -737,8 +737,8 @@ $newList.on('touchstart', 'li', function(e) {
$dgc.removeClass('hide');
break;
case 'sdefault':
$sdefaultgc.removeClass('hide');
case 'default':
$defaultgc.removeClass('hide');
break;
case 'sale':
... ... @@ -800,8 +800,8 @@ $subNav.on('touchend touchcancel', function(e) {
} else {
$newList.addClass('classics');
}
if ($this.hasClass('sdefault')) {
$newList.find('li.sdefault').addClass('active').siblings().removeClass('active');
if ($this.hasClass('default')) {
$newList.find('li.default').addClass('active').siblings().removeClass('active');
} else if ($this.hasClass('new')) {
$newList.find('li.new').addClass('active').siblings().removeClass('active');
} else if ($this.hasClass('sale')) {
... ... @@ -850,9 +850,9 @@ $subNav.on('touchend touchcancel', function(e) {
} else if ($this.hasClass('discount')) {
cname = '.discount';
navType = 'discount';
} else if ($this.hasClass('sdefault')) {
cname = '.sdefault';
navType = 'sdefault';
} else if ($this.hasClass('default')) {
cname = '.default';
navType = 'default';
}
nav = navInfo[navType];
... ... @@ -870,8 +870,8 @@ $subNav.on('touchend touchcancel', function(e) {
case 'discount':
$dgc.removeClass('hide');
break;
case 'sdefault':
$sdefaultgc.removeClass('hide');
case 'default':
$defaultgc.removeClass('hide');
break;
default:
break;
... ...
... ... @@ -59,10 +59,6 @@ const getTypeCont = (type, order) => {
return order === '0' ? 's_t_desc' : 's_t_asc';
case 'hot':
return order === '0' ? 's_n_desc' : 's_n_asc';
case 'default':
return order === '0' ? 's_n_desc' : 's_n_asc';
case 'sdefault':// shop-default 经典店铺首页默认筛选情况下
return order === '0' ? 's_w_desc' : 's_w_asc';
default:
return order === '0' ? 's_t_desc' : 's_t_asc';
}
... ...