...
|
...
|
@@ -4828,19 +4828,28 @@ function hiddenTips($ele) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function isFlexSupport() {
|
|
|
var flex = document.createElement('p').style.flex,
|
|
|
webkitFlex = document.createElement('p').style.webkitFlex,
|
|
|
flexWrap = document.createElement('p').style.flexWrap;
|
|
|
|
|
|
if ((flex === '' || webkitFlex === '') && flexWrap === '') {
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
|
//function isFlexSupport() {
|
|
|
// var flex = document.createElement('p').style.flex,
|
|
|
// webkitFlex = document.createElement('p').style.webkitFlex,
|
|
|
// flexWrap = document.createElement('p').style.flexWrap;
|
|
|
//
|
|
|
// if ((flex === '' || webkitFlex === '') && flexWrap === '') {
|
|
|
// return true;
|
|
|
// } else {
|
|
|
// return false;
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
function wrapElements(selector, count) {
|
|
|
$(selector).each(function(idx, el) {
|
|
|
if (idx % count === 0) {
|
|
|
$($(selector).slice(idx, idx + count)).wrapAll($('<div class="js-wraper"></div>'));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function search() {
|
|
|
if (searching || end) {
|
|
|
return;
|
...
|
...
|
@@ -4875,9 +4884,10 @@ function search() { |
|
|
hiddenTips($('#size-swiper-container'));
|
|
|
hiddenTips($('#reference-swiper-container'));
|
|
|
|
|
|
if (!isFlexSupport()) {
|
|
|
$('.detail .column').removeClass('column').addClass('oldbox');
|
|
|
}
|
|
|
//if (!isFlexSupport()) {
|
|
|
// $('.detail .column').removeClass('column').addClass('oldbox');
|
|
|
//}
|
|
|
wrapElements('.detail .column', 2);
|
|
|
searching = false;
|
|
|
end = true;
|
|
|
loading.hideLoadingMask();
|
...
|
...
|
@@ -5778,9 +5788,6 @@ function loadData($parent, url, page) { |
|
|
page: page
|
|
|
},
|
|
|
success: function(data) {
|
|
|
|
|
|
//setTimeout(function() { //模拟延时
|
|
|
|
|
|
if (url === 'favBrand') {
|
|
|
$brandLoadMore.addClass('hide');
|
|
|
} else {
|
...
|
...
|
@@ -5793,7 +5800,6 @@ function loadData($parent, url, page) { |
|
|
} else if (data === 'end') {
|
|
|
$parent.closest('.fav-type').find('.fav-load-background')
|
|
|
.removeClass('fav-load-background').html('没有更多了');
|
|
|
|
|
|
} else if (data.length > 10) {
|
|
|
$parent.append(data);
|
|
|
$parent.closest('.fav-type').find('.fav-content-loading').remove();
|
...
|
...
|
@@ -5804,14 +5810,8 @@ function loadData($parent, url, page) { |
|
|
} else {
|
|
|
lockId = false;//请求成功后解锁商品收藏page++
|
|
|
}
|
|
|
|
|
|
window.rePosFooter();
|
|
|
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//},1000);
|
|
|
window.rePosFooter();
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
|