Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy.git into develop

... ... @@ -6,6 +6,7 @@
var $ = require('yoho.jquery');
require('./footer');
require('./simple-header');
require('./header');
function cookie(name) {
... ...
... ... @@ -95,14 +95,19 @@ module.exports = function(data) {
var load = new InfiniteLoad({
offset: {
height: function() {
return parseFloat($container.offset().top) + parseFloat($container.height());
return parseFloat($container.offset().top) + parseFloat($container.height()) - 200;
}
}
});
var options;
var url = data.url;
var firstCount = data.firstCount;
var pageCount = data.pageCount;
delete data.url;
delete data.firstCount;
delete data.pageCount;
load.on('after', function(p) {
... ... @@ -111,6 +116,8 @@ module.exports = function(data) {
pageIndex: p.index
});
data.pageCount = (data.pageIndex === 1) ? firstCount : pageCount;
options = {
type: 'POST',
url: url,
... ...
... ... @@ -266,16 +266,16 @@ function fadeAnimate() {
if (window.globaltimeout) {
window.clearTimeout(window.globaltimeout);
}
window.logotrans.fadeOut(window.loopdurationtime, function() {
window.$logotrans.fadeOut(window.loopdurationtime, function() {
window.isen = false;
window.logotrans.css('background-image', 'url(http://static.yohobuy.com/newheader/img/logo.png)');
window.logotrans.fadeIn(window.loopdurationtime, function() {
window.$logotrans.css('background-image', 'url(http://static.yohobuy.com/newheader/img/logo.png)');
window.$logotrans.fadeIn(window.loopdurationtime, function() {
window.onetimeoout = window.setTimeout(function() {
window.logotrans.fadeOut(window.loopdurationtime, function() {
window.$logotrans.fadeOut(window.loopdurationtime, function() {
window.clearTimeout(window.onetimeoout);
window.isen = true;
window.logotrans.css('background-image', 'url(http://static.yohobuy.com/newheader/img/logo_e.png)');
window.logotrans.fadeIn(window.loopdurationtime, function() {
window.$logotrans.css('background-image', 'url(http://static.yohobuy.com/newheader/img/logo_e.png)');
window.$logotrans.fadeIn(window.loopdurationtime, function() {
window.globaltimeout = window.setTimeout(fadeAnimate, 1 * 60 * 1000);
});
});
... ...
... ... @@ -24,7 +24,13 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) {
require('../common/new-arrivls')({
type: homePage,
url: '/common/getNewArrival',
pageCount: homePage === 'boys' ? '15' : '20'
firstCount: homePage === ('boys' || 'lifestyle') ? '25' : '20',
pageCount: homePage === ('boys' || 'lifestyle') ? '15' : '12'
});
window.setCookie('_Channel', homePage, {
domain: '.yohobuy.com',
path: '/',
expires: 365
});
}
... ... @@ -54,3 +60,4 @@ if (homePage === 'boys') {
$('.img-slider-wrapper').slider2();
}
... ...