Authored by 郝肖肖

经典店铺默认 order 参数不传

@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 119
120 <div class="discount-area first" id="navlist2"> 120 <div class="discount-area first" id="navlist2">
121 <ul id="list-nav" class="home-sub-nav list-nav pos-list clearfix"> 121 <ul id="list-nav" class="home-sub-nav list-nav pos-list clearfix">
122 - <li class="sdefault active buriedpoint first-li-more" data-bp-id="shop_listnav_sdefault_1"> 122 + <li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
123 <a href="javascript:void(0);"> 123 <a href="javascript:void(0);">
124 <span class="nav-txt">默认</span> 124 <span class="nav-txt">默认</span>
125 <span class="iconfont up cur hide">&#xe615;</span> 125 <span class="iconfont up cur hide">&#xe615;</span>
@@ -153,7 +153,7 @@ @@ -153,7 +153,7 @@
153 </ul> 153 </ul>
154 <div class='new-list classics hide'> 154 <div class='new-list classics hide'>
155 <ul> 155 <ul>
156 - <li class='active sdefault' data-bp-id='shop_listnav_sdefault_1'>默认</li> 156 + <li class='active default' data-bp-id='shop_listnav_default_1'>默认</li>
157 <li class='new' data-bp-id='shop_listnav_new_1'>最新</li> 157 <li class='new' data-bp-id='shop_listnav_new_1'>最新</li>
158 </ul> 158 </ul>
159 </div> 159 </div>
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
161 161
162 <div class="discount-area first"> 162 <div class="discount-area first">
163 <div id="goods-container" class="goods-container"> 163 <div id="goods-container" class="goods-container">
164 - <div class="sdefault-goods container clearfix"> 164 + <div class="default-goods container clearfix">
165 {{#newGoods}} 165 {{#newGoods}}
166 {{> common/goods}} 166 {{> common/goods}}
167 {{/newGoods}}</div> 167 {{/newGoods}}</div>
@@ -189,7 +189,7 @@ @@ -189,7 +189,7 @@
189 </ul> 189 </ul>
190 190
191 <ul id="pos-list" class="home-sub-nav pos-list hide"> 191 <ul id="pos-list" class="home-sub-nav pos-list hide">
192 - <li class="sdefault active buriedpoint first-li-more" data-bp-id="shop_listnav_sdefault_1"> 192 + <li class="default active buriedpoint first-li-more" data-bp-id="shop_listnav_default_1">
193 <a href="javascript:void(0);"> 193 <a href="javascript:void(0);">
194 <span class="nav-txt">默认</span> 194 <span class="nav-txt">默认</span>
195 <span class="iconfont up cur hide">&#xe615;</span> 195 <span class="iconfont up cur hide">&#xe615;</span>
@@ -30,7 +30,7 @@ var $subNav = $('.home-sub-nav'), @@ -30,7 +30,7 @@ var $subNav = $('.home-sub-nav'),
30 $collect = $('#collect'), 30 $collect = $('#collect'),
31 $goodsContainer = $('#goods-container'), 31 $goodsContainer = $('#goods-container'),
32 $goodsChildren = $goodsContainer.children(), 32 $goodsChildren = $goodsContainer.children(),
33 - $sdefaultgc = $goodsContainer.children('.sdefault-goods'), 33 + $defaultgc = $goodsContainer.children('.default-goods'),
34 $ngc = $($goodsChildren.get(0)), 34 $ngc = $($goodsChildren.get(0)),
35 $pgc = $($goodsChildren.get(1)), 35 $pgc = $($goodsChildren.get(1)),
36 $dgc = $($goodsChildren.get(2)), 36 $dgc = $($goodsChildren.get(2)),
@@ -112,7 +112,7 @@ var defaultOpt = require('../common/query-param'); @@ -112,7 +112,7 @@ var defaultOpt = require('../common/query-param');
112 url: '/product/search/filter', 112 url: '/product/search/filter',
113 data: { 113 data: {
114 shop_id: $('.shopId').val(), 114 shop_id: $('.shopId').val(),
115 - type: 'sdefault', 115 + type: 'default',
116 order: '0', 116 order: '0',
117 channel: defaultOpt.channel 117 channel: defaultOpt.channel
118 }, 118 },
@@ -149,7 +149,7 @@ var $listNav = $('#list-nav'), @@ -149,7 +149,7 @@ var $listNav = $('#list-nav'),
149 page: 1, 149 page: 1,
150 end: false 150 end: false
151 }, 151 },
152 - sdefault: { 152 + default: {
153 order: 0, 153 order: 0,
154 reload: true, 154 reload: true,
155 page: 1, 155 page: 1,
@@ -575,8 +575,8 @@ function search(opt, callback) { @@ -575,8 +575,8 @@ function search(opt, callback) {
575 navType = 'price'; 575 navType = 'price';
576 } else if ($pre.hasClass('discount')) { 576 } else if ($pre.hasClass('discount')) {
577 navType = 'discount'; 577 navType = 'discount';
578 - } else if ($pre.hasClass('sdefault')) {  
579 - navType = 'sdefault'; 578 + } else if ($pre.hasClass('default')) {
  579 + navType = 'default';
580 } 580 }
581 nav = navInfo[navType]; 581 nav = navInfo[navType];
582 582
@@ -629,8 +629,8 @@ function search(opt, callback) { @@ -629,8 +629,8 @@ function search(opt, callback) {
629 case 'discount': 629 case 'discount':
630 $container = $dgc; 630 $container = $dgc;
631 break; 631 break;
632 - case 'sdefault':  
633 - $container = $sdefaultgc; 632 + case 'default':
  633 + $container = $defaultgc;
634 break; 634 break;
635 default: 635 default:
636 break; 636 break;
@@ -704,9 +704,9 @@ $newList.on('touchstart', 'li', function(e) { @@ -704,9 +704,9 @@ $newList.on('touchstart', 'li', function(e) {
704 if ($(this).hasClass('new')) { 704 if ($(this).hasClass('new')) {
705 navType = 'newest'; 705 navType = 'newest';
706 cls = 'new'; 706 cls = 'new';
707 - } else if ($(this).hasClass('sdefault')) {  
708 - navType = 'sdefault';  
709 - cls = 'sdefault'; 707 + } else if ($(this).hasClass('default')) {
  708 + navType = 'default';
  709 + cls = 'default';
710 } else if ($(this).hasClass('sale')) { 710 } else if ($(this).hasClass('sale')) {
711 navType = 'sale'; 711 navType = 'sale';
712 cls = 'sale'; 712 cls = 'sale';
@@ -716,7 +716,7 @@ $newList.on('touchstart', 'li', function(e) { @@ -716,7 +716,7 @@ $newList.on('touchstart', 'li', function(e) {
716 $('#pos-list').addClass('hide'); 716 $('#pos-list').addClass('hide');
717 $firstLiDom.find('.nav-txt').text($(this).text()); 717 $firstLiDom.find('.nav-txt').text($(this).text());
718 $firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active'); 718 $firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
719 - $subNav.find('.first-li-more').removeClass('new sdefault sale').addClass(cls); 719 + $subNav.find('.first-li-more').removeClass('new default sale').addClass(cls);
720 720
721 $(document).trigger('shouldSendBpData', [bpIdData]); 721 $(document).trigger('shouldSendBpData', [bpIdData]);
722 newListHide(); 722 newListHide();
@@ -737,8 +737,8 @@ $newList.on('touchstart', 'li', function(e) { @@ -737,8 +737,8 @@ $newList.on('touchstart', 'li', function(e) {
737 $dgc.removeClass('hide'); 737 $dgc.removeClass('hide');
738 break; 738 break;
739 739
740 - case 'sdefault':  
741 - $sdefaultgc.removeClass('hide'); 740 + case 'default':
  741 + $defaultgc.removeClass('hide');
742 break; 742 break;
743 743
744 case 'sale': 744 case 'sale':
@@ -800,8 +800,8 @@ $subNav.on('touchend touchcancel', function(e) { @@ -800,8 +800,8 @@ $subNav.on('touchend touchcancel', function(e) {
800 } else { 800 } else {
801 $newList.addClass('classics'); 801 $newList.addClass('classics');
802 } 802 }
803 - if ($this.hasClass('sdefault')) {  
804 - $newList.find('li.sdefault').addClass('active').siblings().removeClass('active'); 803 + if ($this.hasClass('default')) {
  804 + $newList.find('li.default').addClass('active').siblings().removeClass('active');
805 } else if ($this.hasClass('new')) { 805 } else if ($this.hasClass('new')) {
806 $newList.find('li.new').addClass('active').siblings().removeClass('active'); 806 $newList.find('li.new').addClass('active').siblings().removeClass('active');
807 } else if ($this.hasClass('sale')) { 807 } else if ($this.hasClass('sale')) {
@@ -850,9 +850,9 @@ $subNav.on('touchend touchcancel', function(e) { @@ -850,9 +850,9 @@ $subNav.on('touchend touchcancel', function(e) {
850 } else if ($this.hasClass('discount')) { 850 } else if ($this.hasClass('discount')) {
851 cname = '.discount'; 851 cname = '.discount';
852 navType = 'discount'; 852 navType = 'discount';
853 - } else if ($this.hasClass('sdefault')) {  
854 - cname = '.sdefault';  
855 - navType = 'sdefault'; 853 + } else if ($this.hasClass('default')) {
  854 + cname = '.default';
  855 + navType = 'default';
856 } 856 }
857 857
858 nav = navInfo[navType]; 858 nav = navInfo[navType];
@@ -870,8 +870,8 @@ $subNav.on('touchend touchcancel', function(e) { @@ -870,8 +870,8 @@ $subNav.on('touchend touchcancel', function(e) {
870 case 'discount': 870 case 'discount':
871 $dgc.removeClass('hide'); 871 $dgc.removeClass('hide');
872 break; 872 break;
873 - case 'sdefault':  
874 - $sdefaultgc.removeClass('hide'); 873 + case 'default':
  874 + $defaultgc.removeClass('hide');
875 break; 875 break;
876 default: 876 default:
877 break; 877 break;
@@ -59,10 +59,6 @@ const getTypeCont = (type, order) => { @@ -59,10 +59,6 @@ const getTypeCont = (type, order) => {
59 return order === '0' ? 's_t_desc' : 's_t_asc'; 59 return order === '0' ? 's_t_desc' : 's_t_asc';
60 case 'hot': 60 case 'hot':
61 return order === '0' ? 's_n_desc' : 's_n_asc'; 61 return order === '0' ? 's_n_desc' : 's_n_asc';
62 - case 'default':  
63 - return order === '0' ? 's_n_desc' : 's_n_asc';  
64 - case 'sdefault':// shop-default 经典店铺首页默认筛选情况下  
65 - return order === '0' ? 's_w_desc' : 's_w_asc';  
66 default: 62 default:
67 return order === '0' ? 's_t_desc' : 's_t_asc'; 63 return order === '0' ? 's_t_desc' : 's_t_asc';
68 } 64 }