Authored by weiqingting

_Chanel cookie 设置

@@ -95,14 +95,14 @@ module.exports = function(data) { @@ -95,14 +95,14 @@ module.exports = function(data) {
95 var load = new InfiniteLoad({ 95 var load = new InfiniteLoad({
96 offset: { 96 offset: {
97 height: function() { 97 height: function() {
98 - return parseFloat($container.offset().top) + parseFloat($container.height())-200; 98 + return parseFloat($container.offset().top) + parseFloat($container.height()) - 200;
99 } 99 }
100 } 100 }
101 }); 101 });
102 var options; 102 var options;
103 var url = data.url; 103 var url = data.url;
104 var firstCount = data.firstCount; 104 var firstCount = data.firstCount;
105 - var pageCount=data.pageCount; 105 + var pageCount = data.pageCount;
106 106
107 delete data.url; 107 delete data.url;
108 delete data.firstCount; 108 delete data.firstCount;
@@ -116,7 +116,7 @@ module.exports = function(data) { @@ -116,7 +116,7 @@ module.exports = function(data) {
116 pageIndex: p.index 116 pageIndex: p.index
117 }); 117 });
118 118
119 - data.pageCount = (data.pageIndex == 1) ? firstCount : pageCount; 119 + data.pageCount = (data.pageIndex === 1) ? firstCount : pageCount;
120 120
121 options = { 121 options = {
122 type: 'POST', 122 type: 'POST',
@@ -27,6 +27,7 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) { @@ -27,6 +27,7 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) {
27 firstCount: homePage === ('boys' || 'lifestyle') ? '25' : '20', 27 firstCount: homePage === ('boys' || 'lifestyle') ? '25' : '20',
28 pageCount: homePage === ('boys' || 'lifestyle') ? '15' : '12' 28 pageCount: homePage === ('boys' || 'lifestyle') ? '15' : '12'
29 }); 29 });
  30 + window.setCookie("_Channel",homePage,{domain: '.yohobuy.com',path: '/',expires:365});
30 } 31 }
31 32
32 33
@@ -55,3 +56,4 @@ if (homePage === 'boys') { @@ -55,3 +56,4 @@ if (homePage === 'boys') {
55 $('.img-slider-wrapper').slider2(); 56 $('.img-slider-wrapper').slider2();
56 } 57 }
57 58
  59 +