|
@@ -34,7 +34,8 @@ let $input = $('#search-input').find('input[name="query"]'), |
|
@@ -34,7 +34,8 @@ let $input = $('#search-input').find('input[name="query"]'), |
34
|
$clear = $('#search-input .clear-input'),
|
34
|
$clear = $('#search-input .clear-input'),
|
35
|
$buriedpoint = $('.buriedpoint'),
|
35
|
$buriedpoint = $('.buriedpoint'),
|
36
|
$search = $('#search'),
|
36
|
$search = $('#search'),
|
37
|
- $dropList = $('.drop-list');
|
37
|
+ $dropList = $('.drop-list'),
|
|
|
38
|
+ $searchDivide = $('.search-divide');
|
38
|
|
39
|
|
39
|
let shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId, searchFrom;
|
40
|
let shopId, sort, brand, outlets, app_type, age_level, msort, misort, coin, app_version, students, couponId, searchFrom;
|
40
|
let size, color, style, standard, gender, price, p_d, oldquery, query, limited, specialoffer, specialsale_id, promotion;
|
41
|
let size, color, style, standard, gender, price, p_d, oldquery, query, limited, specialoffer, specialsale_id, promotion;
|
|
@@ -422,7 +423,6 @@ function search(opt) { |
|
@@ -422,7 +423,6 @@ function search(opt) { |
422
|
page = 1;
|
423
|
page = 1;
|
423
|
} else if (nav.end) {
|
424
|
} else if (nav.end) {
|
424
|
// 不需要重新加载并且数据请求结束
|
425
|
// 不需要重新加载并且数据请求结束
|
425
|
- $('.search-divide').remove();
|
|
|
426
|
return;
|
426
|
return;
|
427
|
}
|
427
|
}
|
428
|
|
428
|
|
|
@@ -548,7 +548,7 @@ function search(opt) { |
|
@@ -548,7 +548,7 @@ function search(opt) { |
548
|
|
548
|
|
549
|
argument = setting;
|
549
|
argument = setting;
|
550
|
|
550
|
|
551
|
- $goodsContainer.append('<div class="search-divide">正在加载...</div>');
|
551
|
+ $searchDivide.removeClass('hide');
|
552
|
|
552
|
|
553
|
$.ajax({
|
553
|
$.ajax({
|
554
|
type: 'GET',
|
554
|
type: 'GET',
|
|
@@ -632,7 +632,7 @@ function search(opt) { |
|
@@ -632,7 +632,7 @@ function search(opt) { |
632
|
if (nav.reload && !firstScreen) {
|
632
|
if (nav.reload && !firstScreen) {
|
633
|
$container.html(data);
|
633
|
$container.html(data);
|
634
|
num = $container.find('.good-info').length;
|
634
|
num = $container.find('.good-info').length;
|
635
|
- $('.search-divide').remove();
|
635
|
+
|
636
|
lazyLoad($container.find('.lazy'));
|
636
|
lazyLoad($container.find('.lazy'));
|
637
|
|
637
|
|
638
|
RES_QTY = $container.find('.total').data('id');
|
638
|
RES_QTY = $container.find('.total').data('id');
|
|
@@ -662,12 +662,8 @@ function search(opt) { |
|
@@ -662,12 +662,8 @@ function search(opt) { |
662
|
}, 200);
|
662
|
}, 200);
|
663
|
} else {
|
663
|
} else {
|
664
|
num = $container.find('.good-info').length;
|
664
|
num = $container.find('.good-info').length;
|
665
|
- $('.search-divide').remove();
|
665
|
+
|
666
|
$container.append(data);
|
666
|
$container.append(data);
|
667
|
- $container.append('<div class="search-divide">正在加载...</div>');
|
|
|
668
|
- if (num < 12) {
|
|
|
669
|
- $('.search-divide').remove();
|
|
|
670
|
- }
|
|
|
671
|
|
667
|
|
672
|
if ($container.find('.total')[1]) {
|
668
|
if ($container.find('.total')[1]) {
|
673
|
$container.find('.total').eq(1).remove();
|
669
|
$container.find('.total').eq(1).remove();
|
|
@@ -704,6 +700,7 @@ function search(opt) { |
|
@@ -704,6 +700,7 @@ function search(opt) { |
704
|
}
|
700
|
}
|
705
|
}
|
701
|
}
|
706
|
|
702
|
|
|
|
703
|
+ $searchDivide.addClass('hide');
|
707
|
nav.reload = false;
|
704
|
nav.reload = false;
|
708
|
nav.page = page;
|
705
|
nav.page = page;
|
709
|
|
706
|
|
|
@@ -750,7 +747,7 @@ function search(opt) { |
|
@@ -750,7 +747,7 @@ function search(opt) { |
750
|
}
|
747
|
}
|
751
|
},
|
748
|
},
|
752
|
error: function() {
|
749
|
error: function() {
|
753
|
- let $divide = $('.search-divide');
|
750
|
+ let $divide = $searchDivide;
|
754
|
|
751
|
|
755
|
$divide.html('加载失败,点击重试');
|
752
|
$divide.html('加载失败,点击重试');
|
756
|
$divide.one('click', function() {
|
753
|
$divide.one('click', function() {
|
|
@@ -1249,9 +1246,4 @@ $('.brand-way a').on('click', function() { |
|
@@ -1249,9 +1246,4 @@ $('.brand-way a').on('click', function() { |
1249
|
}
|
1246
|
}
|
1250
|
});
|
1247
|
});
|
1251
|
|
1248
|
|
1252
|
-
|
|
|
1253
|
-let fuckNum = $('.good-info').length;
|
|
|
1254
|
-
|
|
|
1255
|
-fuckNum < 12 && $('.search-divide').remove();
|
|
|
1256
|
-
|
|
|
1257
|
require('channel/maybe-like')({recpose: 100101, isExecute: true}); |
1249
|
require('channel/maybe-like')({recpose: 100101, isExecute: true}); |