...
|
...
|
@@ -218,7 +218,7 @@ function getParam(req) { |
|
|
function newData(callback) {
|
|
|
var req = {};
|
|
|
|
|
|
req.url = location.protocol + '//m.yohobuy.com/index/search/search';
|
|
|
req.url = location.protocol + '//m.yohobuy.com/product/search/search';
|
|
|
req.data = {
|
|
|
type: 'new',
|
|
|
order: '1',
|
...
|
...
|
@@ -231,7 +231,7 @@ function newData(callback) { |
|
|
req.callBack = function(data) {
|
|
|
$('#new-arrival').append(data);
|
|
|
navInfo.new.page++;
|
|
|
myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
lazyLoad($('#new-arrival .lazy'));
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
searching = false;
|
...
|
...
|
@@ -243,7 +243,7 @@ function newData(callback) { |
|
|
function hotData(callback) {
|
|
|
var req = {};
|
|
|
|
|
|
req.url = location.protocol + '//m.yohobuy.com/index/search/search';
|
|
|
req.url = location.protocol + '//m.yohobuy.com/product/search/search';
|
|
|
req.data = {
|
|
|
type: 'hot',
|
|
|
order: '1',
|
...
|
...
|
@@ -256,8 +256,7 @@ function hotData(callback) { |
|
|
req.callBack = function(data) {
|
|
|
$('#popularity').append(data);
|
|
|
navInfo.hot.page++;
|
|
|
|
|
|
// myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
lazyLoad($('#popularity .lazy'));
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
searching = false;
|
...
|
...
|
@@ -303,8 +302,7 @@ function tabChange(dom, index) { |
|
|
$nav1.removeClass('fixed-top absolute');
|
|
|
$nav2.removeClass('fixed-top absolute');
|
|
|
}
|
|
|
|
|
|
// myScroll && myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
if (!$nav1.hasClass('hide')) {
|
|
|
myScroll && myScroll.scrollTo(0, 0 - imgH);
|
...
|
...
|
@@ -371,7 +369,7 @@ function scrollHandler() { |
|
|
type: 'shop_id',
|
|
|
id: shopId,
|
|
|
brand: brand,
|
|
|
url: location.protocol + '//m.yohobuy.com/index/search/search',
|
|
|
url: location.protocol + '//m.yohobuy.com/product/search/search',
|
|
|
nextPage: true
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -466,6 +464,8 @@ function scrollHandler() { |
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$('#scroller').trigger('scroll');
|
|
|
}
|
|
|
|
|
|
document.addEventListener('touchmove', function(e) {
|
...
|
...
|
@@ -486,9 +486,9 @@ $(window).ready(function() { |
|
|
imgH = $('#nav-top').outerHeight();
|
|
|
nav1H = $('#nav').outerHeight();
|
|
|
main1H = $('#nav-main').height();
|
|
|
main1oH = $('#nav-main').outerHeight();
|
|
|
nav2H = $('#list-nav').outerHeight();
|
|
|
main2oH = $('#goods-container').outerHeight();
|
|
|
main1oH = $('#nav-main').outerHeight(true);
|
|
|
nav2H = $('#list-nav').outerHeight(true);
|
|
|
main2oH = $('#goods-container').outerHeight(true);
|
|
|
|
|
|
|
|
|
myScroll = new IScroll('#wrapper', {
|
...
|
...
|
@@ -519,7 +519,7 @@ $(window).ready(function() { |
|
|
|
|
|
multiSwiper && multiSwiper.startAutoplay();
|
|
|
|
|
|
$('#scroller').trigger('scroll');
|
|
|
// $('#scroller').trigger('scroll');
|
|
|
scrollHandler.bind(this)();
|
|
|
});
|
|
|
lazyLoad($('img.lazy'));
|
...
|
...
|
@@ -541,7 +541,7 @@ function search(opt) { |
|
|
}
|
|
|
|
|
|
if (!opt.url) {
|
|
|
opt.url = location.protocol + '//m.yohobuy.com/index/search/search';
|
|
|
opt.url = location.protocol + '//m.yohobuy.com/product/search/search';
|
|
|
}
|
|
|
|
|
|
$pre = $listNav.find('.active').eq(0);
|
...
|
...
|
@@ -739,10 +739,11 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
|
|
|
// 筛选面板切换状态
|
|
|
if ($this.hasClass('active')) {
|
|
|
$this.removeClass('active');
|
|
|
filter.hideFilter();
|
|
|
myScroll && myScroll.enable();
|
|
|
} else {
|
|
|
|
|
|
$this.addClass('active');
|
|
|
myScroll && myScroll.scrollTo(0, -(imgH + main1oH + nav1H));
|
|
|
|
|
|
theY = imgH + main1oH + nav1H;
|
...
|
...
|
@@ -760,6 +761,9 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
myScroll && myScroll.disable();
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
filter.hideFilter();// 隐藏面板
|
|
|
|
|
|
if ($this.hasClass('new')) {
|
|
|
cname = '.new';
|
|
|
navType = 'newest';
|
...
|
...
|
@@ -850,7 +854,7 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
type: 'shop_id',
|
|
|
id: shopId,
|
|
|
brand: brand,
|
|
|
url: location.protocol + '//m.yohobuy.com/index/search/search',
|
|
|
url: location.protocol + '//m.yohobuy.com/product/search/search',
|
|
|
nextPage: false
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -908,7 +912,7 @@ function stopPropagation(e) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
$(document).bind('touchstart', function(e) {
|
|
|
$(document).bind('touchstart', function() {
|
|
|
$('.sub-group').addClass('hide');
|
|
|
});
|
|
|
|
...
|
...
|
@@ -940,9 +944,9 @@ $collect.on('touchstart', function() { |
|
|
opt: opt,
|
|
|
type: 'shop'
|
|
|
},
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
|
},
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var url = '';
|
|
|
|
...
|
...
|
@@ -965,7 +969,7 @@ $collect.on('touchstart', function() { |
|
|
}
|
|
|
|
|
|
setTimeout(function() {
|
|
|
// myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
}, 500);
|
|
|
searching = false;
|
...
|
...
|
|