Showing
4 changed files
with
13 additions
and
9 deletions
@@ -6,7 +6,7 @@ var InfiniteLoad = require('../common/infinite-load'); | @@ -6,7 +6,7 @@ var InfiniteLoad = require('../common/infinite-load'); | ||
6 | 6 | ||
7 | (function($) { | 7 | (function($) { |
8 | var $container = $('div.commodity ul'); | 8 | var $container = $('div.commodity ul'); |
9 | - var $load = $('.loading'); | 9 | + var $load = $('.loading a'); |
10 | var load = new InfiniteLoad({ | 10 | var load = new InfiniteLoad({ |
11 | offset: { | 11 | offset: { |
12 | height: function() { | 12 | height: function() { |
@@ -16,6 +16,7 @@ var InfiniteLoad = require('../common/infinite-load'); | @@ -16,6 +16,7 @@ var InfiniteLoad = require('../common/infinite-load'); | ||
16 | }); | 16 | }); |
17 | 17 | ||
18 | load.on('after', function(p) { | 18 | load.on('after', function(p) { |
19 | + console.log(p.index); | ||
19 | var options = { | 20 | var options = { |
20 | type: 'POST', | 21 | type: 'POST', |
21 | url: '/boys/commodity', | 22 | url: '/boys/commodity', |
@@ -40,7 +41,7 @@ var InfiniteLoad = require('../common/infinite-load'); | @@ -40,7 +41,7 @@ var InfiniteLoad = require('../common/infinite-load'); | ||
40 | load.emit(); | 41 | load.emit(); |
41 | } else { | 42 | } else { |
42 | 43 | ||
43 | - $load.html('END'); | 44 | + $load.html('查看更多'); |
44 | } | 45 | } |
45 | }, | 46 | }, |
46 | error: function() { | 47 | error: function() { |
@@ -342,6 +342,7 @@ | @@ -342,6 +342,7 @@ | ||
342 | 342 | ||
343 | .commodity{ | 343 | .commodity{ |
344 | margin-left: -10px; | 344 | margin-left: -10px; |
345 | + margin-bottom:80px; | ||
345 | position: relative; | 346 | position: relative; |
346 | li{ | 347 | li{ |
347 | float: left; | 348 | float: left; |
@@ -383,10 +384,8 @@ | @@ -383,10 +384,8 @@ | ||
383 | position: absolute; | 384 | position: absolute; |
384 | bottom: 0; | 385 | bottom: 0; |
385 | width: 100%; | 386 | width: 100%; |
386 | - p{ | ||
387 | - text-align: center; | ||
388 | - font-size: 20px; | ||
389 | - } | 387 | + text-align: center; |
388 | + font-size: 20px; | ||
390 | } | 389 | } |
391 | } | 390 | } |
392 | 391 |
@@ -443,8 +443,8 @@ class BoysController extends AbstractAction | @@ -443,8 +443,8 @@ class BoysController extends AbstractAction | ||
443 | /** | 443 | /** |
444 | * 男装首页 新品上架 接口数据 | 444 | * 男装首页 新品上架 接口数据 |
445 | * | 445 | * |
446 | - * @param int $pageIndex 当前页数 | ||
447 | - * @param int $pageCount 一页显示个数 | 446 | + * @param int pageIndex 当前页数 |
447 | + * @param int pageCount 一页显示个数 | ||
448 | * @param string flag 类型(男装/女装等,用于区分) | 448 | * @param string flag 类型(男装/女装等,用于区分) |
449 | * @return json | 449 | * @return json |
450 | */ | 450 | */ |
@@ -457,6 +457,10 @@ class BoysController extends AbstractAction | @@ -457,6 +457,10 @@ class BoysController extends AbstractAction | ||
457 | if (!$this->isAjax()) { | 457 | if (!$this->isAjax()) { |
458 | break; | 458 | break; |
459 | } | 459 | } |
460 | + $pageIndex = $this->post('pageIndex'); | ||
461 | + if($pageIndex>=3){ | ||
462 | + break; | ||
463 | + } | ||
460 | 464 | ||
461 | $result=array( | 465 | $result=array( |
462 | 'code'=>200, | 466 | 'code'=>200, |
-
Please register or login to post a comment