Authored by weiqingting

女装首页和男装修改

@@ -4,7 +4,7 @@ var $ = require('yoho.jquery'); @@ -4,7 +4,7 @@ var $ = require('yoho.jquery');
4 var Handlebars = require('yoho.handlebars'); 4 var Handlebars = require('yoho.handlebars');
5 var InfiniteLoad = require('../common/infinite-load'); 5 var InfiniteLoad = require('../common/infinite-load');
6 6
7 -module.exports=function(url,data){ 7 +module.exports = function(url, data) {
8 var $container = $('#newarrivals ul'); 8 var $container = $('#newarrivals ul');
9 var $load = $('.loading a'); 9 var $load = $('.loading a');
10 var load = new InfiniteLoad({ 10 var load = new InfiniteLoad({
@@ -14,11 +14,15 @@ module.exports=function(url,data){ @@ -14,11 +14,15 @@ module.exports=function(url,data){
14 } 14 }
15 } 15 }
16 }); 16 });
  17 + var options;
17 18
18 load.on('after', function(p) { 19 load.on('after', function(p) {
19 20
20 - data=$.extend({},data,{pageIndex: p.index});  
21 - var options = { 21 + data = $.extend({}, data, {
  22 + pageIndex: p.index
  23 + });
  24 +
  25 + options = {
22 type: 'POST', 26 type: 'POST',
23 url: url, 27 url: url,
24 data: data, 28 data: data,
@@ -72,7 +76,4 @@ module.exports=function(url,data){ @@ -72,7 +76,4 @@ module.exports=function(url,data){
72 }); 76 });
73 77
74 load.init(); 78 load.init();
75 -}  
76 -  
77 -  
78 - 79 +};
@@ -7,13 +7,13 @@ @@ -7,13 +7,13 @@
7 var $ = require('yoho.jquery'), 7 var $ = require('yoho.jquery'),
8 Handlebars = require('yoho.handlebars'), 8 Handlebars = require('yoho.handlebars'),
9 lazyLoad = require('yoho.lazyload'); 9 lazyLoad = require('yoho.lazyload');
  10 +var $data = JSON.parse($('.home-page').attr('data-newarrivls'));
10 11
11 require('../common/linkage-slider'); 12 require('../common/linkage-slider');
12 13
13 require('../common/slider2'); 14 require('../common/slider2');
14 15
15 -var $data= JSON.parse($(".home-page").attr('data-newarrivls'));  
16 -require('../common/new-arrivls')($data.url,{ 16 +require('../common/new-arrivls')($data.url, {
17 pageCount: $data.pageCount, 17 pageCount: $data.pageCount,
18 flag: $data.flag 18 flag: $data.flag
19 }); 19 });