...
|
...
|
@@ -186,7 +186,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',
|
...
|
...
|
@@ -199,7 +199,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;
|
...
|
...
|
@@ -211,7 +211,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',
|
...
|
...
|
@@ -224,8 +224,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;
|
...
|
...
|
@@ -271,8 +270,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);
|
...
|
...
|
@@ -339,7 +337,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
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -434,6 +432,8 @@ function scrollHandler() { |
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$('#scroller').trigger('scroll');
|
|
|
}
|
|
|
|
|
|
document.addEventListener('touchmove', function(e) {
|
...
|
...
|
@@ -454,9 +454,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', {
|
...
|
...
|
@@ -487,7 +487,7 @@ $(window).ready(function() { |
|
|
|
|
|
multiSwiper && multiSwiper.startAutoplay();
|
|
|
|
|
|
$('#scroller').trigger('scroll');
|
|
|
//$('#scroller').trigger('scroll');
|
|
|
scrollHandler.bind(this)();
|
|
|
});
|
|
|
lazyLoad($('img.lazy'));
|
...
|
...
|
@@ -509,7 +509,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);
|
...
|
...
|
@@ -707,10 +707,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;
|
...
|
...
|
@@ -728,6 +729,9 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
myScroll && myScroll.disable();
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
filter.hideFilter();//隐藏面板
|
|
|
|
|
|
if ($this.hasClass('new')) {
|
|
|
cname = '.new';
|
|
|
navType = 'newest';
|
...
|
...
|
@@ -818,7 +822,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
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -876,7 +880,7 @@ function stopPropagation(e) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
$(document).bind('touchstart', function(e) {
|
|
|
$(document).bind('touchstart', function() {
|
|
|
$('.sub-group').addClass('hide');
|
|
|
});
|
|
|
|
...
|
...
|
@@ -933,7 +937,7 @@ $collect.on('touchstart', function() { |
|
|
}
|
|
|
|
|
|
setTimeout(function() {
|
|
|
// myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
}, 500);
|
|
|
searching = false;
|
...
|
...
|
|