|
@@ -27,7 +27,7 @@ var tip = require('../../plugin/tip'), |
|
@@ -27,7 +27,7 @@ var tip = require('../../plugin/tip'), |
27
|
var $subNav = $('.home-sub-nav'),
|
27
|
var $subNav = $('.home-sub-nav'),
|
28
|
$collect = $('#collect'),
|
28
|
$collect = $('#collect'),
|
29
|
$goodsContainer = $('#goods-container'),
|
29
|
$goodsContainer = $('#goods-container'),
|
30
|
- $ngc = $goodsContainer.children('.new-goods'),
|
30
|
+ $ngc = $goodsContainer.children('.newest-goods'),
|
31
|
$defaultgc = $goodsContainer.children('.default-goods'),
|
31
|
$defaultgc = $goodsContainer.children('.default-goods'),
|
32
|
$sgc = $goodsContainer.children('.sale-goods'),
|
32
|
$sgc = $goodsContainer.children('.sale-goods'),
|
33
|
$pgc = $goodsContainer.children('.price-goods'),
|
33
|
$pgc = $goodsContainer.children('.price-goods'),
|
|
@@ -91,7 +91,7 @@ var $listNav = $('#list-nav'), |
|
@@ -91,7 +91,7 @@ var $listNav = $('#list-nav'), |
91
|
// 导航数据信息
|
91
|
// 导航数据信息
|
92
|
navInfo = {
|
92
|
navInfo = {
|
93
|
new: {
|
93
|
new: {
|
94
|
- order: 0,
|
94
|
+ order: 1,
|
95
|
reload: true,
|
95
|
reload: true,
|
96
|
page: 1,
|
96
|
page: 1,
|
97
|
end: false
|
97
|
end: false
|
|
@@ -111,7 +111,13 @@ var $listNav = $('#list-nav'), |
|
@@ -111,7 +111,13 @@ var $listNav = $('#list-nav'), |
111
|
discount: {
|
111
|
discount: {
|
112
|
order: 1,
|
112
|
order: 1,
|
113
|
reload: true,
|
113
|
reload: true,
|
114
|
- page: 1,
|
114
|
+ page: 0,
|
|
|
115
|
+ end: false
|
|
|
116
|
+ },
|
|
|
117
|
+ newest: {
|
|
|
118
|
+ order: 0,
|
|
|
119
|
+ reload: true,
|
|
|
120
|
+ page: 0,
|
115
|
end: false
|
121
|
end: false
|
116
|
},
|
122
|
},
|
117
|
default: {
|
123
|
default: {
|
|
@@ -629,8 +635,8 @@ function search(opt) { |
|
@@ -629,8 +635,8 @@ function search(opt) { |
629
|
}
|
635
|
}
|
630
|
|
636
|
|
631
|
// 导航类别
|
637
|
// 导航类别
|
632
|
- if ($pre.hasClass('new')) {
|
|
|
633
|
- navType = 'new';
|
638
|
+ if ($pre.hasClass('newest')) {
|
|
|
639
|
+ navType = 'newest';
|
634
|
} else if ($pre.hasClass('price')) {
|
640
|
} else if ($pre.hasClass('price')) {
|
635
|
navType = 'price';
|
641
|
navType = 'price';
|
636
|
} else if ($pre.hasClass('discount')) {
|
642
|
} else if ($pre.hasClass('discount')) {
|
|
@@ -682,7 +688,7 @@ function search(opt) { |
|
@@ -682,7 +688,7 @@ function search(opt) { |
682
|
num;
|
688
|
num;
|
683
|
|
689
|
|
684
|
switch (navType) {
|
690
|
switch (navType) {
|
685
|
- case 'new':
|
691
|
+ case 'newest':
|
686
|
$container = $ngc;
|
692
|
$container = $ngc;
|
687
|
break;
|
693
|
break;
|
688
|
case 'price':
|
694
|
case 'price':
|
|
@@ -763,8 +769,8 @@ $newList.on('touchstart', 'li', function(e) { |
|
@@ -763,8 +769,8 @@ $newList.on('touchstart', 'li', function(e) { |
763
|
$firstLiDom = $('ul.pos-list').find('li.first-li-more');
|
769
|
$firstLiDom = $('ul.pos-list').find('li.first-li-more');
|
764
|
|
770
|
|
765
|
e.preventDefault();
|
771
|
e.preventDefault();
|
766
|
- if ($(this).hasClass('new')) {
|
|
|
767
|
- navType = 'new';
|
772
|
+ if ($(this).hasClass('newest')) {
|
|
|
773
|
+ navType = 'newest';
|
768
|
} else if ($(this).hasClass('default')) {
|
774
|
} else if ($(this).hasClass('default')) {
|
769
|
navType = 'default';
|
775
|
navType = 'default';
|
770
|
} else if ($(this).hasClass('sale')) {
|
776
|
} else if ($(this).hasClass('sale')) {
|
|
@@ -774,7 +780,7 @@ $newList.on('touchstart', 'li', function(e) { |
|
@@ -774,7 +780,7 @@ $newList.on('touchstart', 'li', function(e) { |
774
|
$newList.addClass('hide');
|
780
|
$newList.addClass('hide');
|
775
|
$firstLiDom.find('.spanTest').text($(this).text());
|
781
|
$firstLiDom.find('.spanTest').text($(this).text());
|
776
|
$firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
|
782
|
$firstLiDom.attr('data-bp-id', bpIdData).addClass('active').siblings().removeClass('active');
|
777
|
- $subNav.find('.first-li-more').removeClass('new default sale').addClass(navType);
|
783
|
+ $subNav.find('.first-li-more').removeClass('newest default sale').addClass(navType);
|
778
|
|
784
|
|
779
|
$(document).trigger('shouldSendBpData', [bpIdData]);
|
785
|
$(document).trigger('shouldSendBpData', [bpIdData]);
|
780
|
newListHide();
|
786
|
newListHide();
|
|
@@ -783,7 +789,7 @@ $newList.on('touchstart', 'li', function(e) { |
|
@@ -783,7 +789,7 @@ $newList.on('touchstart', 'li', function(e) { |
783
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
789
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
784
|
|
790
|
|
785
|
switch (navType) {
|
791
|
switch (navType) {
|
786
|
- case 'new':
|
792
|
+ case 'newest':
|
787
|
$ngc.removeClass('hide');
|
793
|
$ngc.removeClass('hide');
|
788
|
break;
|
794
|
break;
|
789
|
|
795
|
|
|
@@ -839,8 +845,8 @@ $subNav.on('touchend touchcancel', function(e) { |
|
@@ -839,8 +845,8 @@ $subNav.on('touchend touchcancel', function(e) { |
839
|
$newList.toggleClass('hide');
|
845
|
$newList.toggleClass('hide');
|
840
|
if ($this.hasClass('default')) {
|
846
|
if ($this.hasClass('default')) {
|
841
|
$newList.find('li.default').addClass('active').siblings().removeClass('active');
|
847
|
$newList.find('li.default').addClass('active').siblings().removeClass('active');
|
842
|
- } else if ($this.hasClass('new')) {
|
|
|
843
|
- $newList.find('li.new').addClass('active').siblings().removeClass('active');
|
848
|
+ } else if ($this.hasClass('newest')) {
|
|
|
849
|
+ $newList.find('li.newest').addClass('active').siblings().removeClass('active');
|
844
|
} else if ($this.hasClass('sale')) {
|
850
|
} else if ($this.hasClass('sale')) {
|
845
|
$newList.find('li.sale').addClass('active').siblings().removeClass('active');
|
851
|
$newList.find('li.sale').addClass('active').siblings().removeClass('active');
|
846
|
}
|
852
|
}
|
|
@@ -886,9 +892,9 @@ $subNav.on('touchend touchcancel', function(e) { |
|
@@ -886,9 +892,9 @@ $subNav.on('touchend touchcancel', function(e) { |
886
|
|
892
|
|
887
|
filter.hideFilter();// 隐藏面板
|
893
|
filter.hideFilter();// 隐藏面板
|
888
|
|
894
|
|
889
|
- if ($this.hasClass('new')) {
|
|
|
890
|
- cname = '.new';
|
|
|
891
|
- navType = 'new';
|
895
|
+ if ($this.hasClass('newest')) {
|
|
|
896
|
+ cname = '.newest';
|
|
|
897
|
+ navType = 'newest';
|
892
|
} else if ($this.hasClass('price')) {
|
898
|
} else if ($this.hasClass('price')) {
|
893
|
cname = '.price';
|
899
|
cname = '.price';
|
894
|
navType = 'price';
|
900
|
navType = 'price';
|
|
@@ -925,8 +931,8 @@ $subNav.on('touchend touchcancel', function(e) { |
|
@@ -925,8 +931,8 @@ $subNav.on('touchend touchcancel', function(e) { |
925
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
931
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
926
|
|
932
|
|
927
|
switch (navType) {
|
933
|
switch (navType) {
|
928
|
- case 'new':
|
|
|
929
|
- $ngc.removeClass('hide');
|
934
|
+ case 'newest':
|
|
|
935
|
+ $ngc.removeClass('newest');
|
930
|
break;
|
936
|
break;
|
931
|
|
937
|
|
932
|
case 'price':
|
938
|
case 'price':
|
|
@@ -962,7 +968,7 @@ $subNav.on('touchend touchcancel', function(e) { |
|
@@ -962,7 +968,7 @@ $subNav.on('touchend touchcancel', function(e) { |
962
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
968
|
$goodsContainer.children('.container:not(.hide)').addClass('hide');
|
963
|
|
969
|
|
964
|
switch (navType) {
|
970
|
switch (navType) {
|
965
|
- case 'new':
|
971
|
+ case 'newest':
|
966
|
$ngc.removeClass('hide');
|
972
|
$ngc.removeClass('hide');
|
967
|
break;
|
973
|
break;
|
968
|
|
974
|
|