Authored by xuqi

product pager

@@ -143,6 +143,7 @@ @@ -143,6 +143,7 @@
143 <div class="good-select-color"></div> 143 <div class="good-select-color"></div>
144 </div> 144 </div>
145 </div> 145 </div>
  146 + {{> product/pager}}
146 </div> 147 </div>
147 {{/ brandAbout}} 148 {{/ brandAbout}}
148 </div> 149 </div>
@@ -20,6 +20,8 @@ @@ -20,6 +20,8 @@
20 <div class="good-select-color"></div> 20 <div class="good-select-color"></div>
21 </div> 21 </div>
22 </div> 22 </div>
  23 +
  24 + {{> product/pager}}
23 {{/ search}} 25 {{/ search}}
24 </div> 26 </div>
25 {{> layout/footer}} 27 {{> layout/footer}}
  1 +<div class="product-pager clearfix">
  2 + <span class="total">{{opts.curPage}} - {{opts.pageCount}} / 共{{totalCount}}件商品</span>
  3 +
  4 + <div class="pager">
  5 + {{{pager}}}
  6 + </div>
  7 +</div>
  1 +.pager {
  2 + font-size: 12px;
  3 +
  4 + a {
  5 + height: 24px;
  6 + padding: 0 9px;
  7 + line-height: 24px;
  8 + display: inline-block;
  9 + text-align: center;
  10 + margin-right: 8px;
  11 + color: #222;
  12 +
  13 + &.cur {
  14 + background-color: #222;
  15 + color: #fff;
  16 + }
  17 + }
  18 +}
@@ -4,7 +4,8 @@ @@ -4,7 +4,8 @@
4 "compass/reset", 4 "compass/reset",
5 "header", 5 "header",
6 "footer", 6 "footer",
7 - "path-nav"; 7 + "path-nav",
  8 + "pager";
8 9
9 body { 10 body {
10 font-family: arial,"Microsoft YaHei"; 11 font-family: arial,"Microsoft YaHei";
1 @import "search", "list", "filter-box", "sort-pager", "good"; 1 @import "search", "list", "filter-box", "sort-pager", "good";
  2 +
  3 +.product-pager {
  4 + padding: 20px 0;
  5 + font-size: 12px;
  6 + color: #6a6a6a;
  7 + border-top: 1px solid #e7e9e8;
  8 +
  9 + .pager {
  10 + float: right;
  11 + }
  12 +}
@@ -310,7 +310,6 @@ class IndexController extends AbstractAction @@ -310,7 +310,6 @@ class IndexController extends AbstractAction
310 'curPage' => 1, 310 'curPage' => 1,
311 'pageCount' => 30, 311 'pageCount' => 30,
312 'nextHref' => 'hello' 312 'nextHref' => 'hello'
313 - )  
314 ), 313 ),
315 'goods' => array( 314 'goods' => array(
316 0 => array( 315 0 => array(
@@ -371,7 +370,10 @@ class IndexController extends AbstractAction @@ -371,7 +370,10 @@ class IndexController extends AbstractAction
371 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋', 370 'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
372 'salePrice' => '899' 371 'salePrice' => '899'
373 ) 372 )
374 - ) 373 + ),
  374 + 'totalCount' => '2273',
  375 + 'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="ifont10">&gt;</span></a>'
  376 + ),
375 ); 377 );
376 $this->_view->display('search', $data); 378 $this->_view->display('search', $data);
377 } 379 }
@@ -892,7 +894,10 @@ class IndexController extends AbstractAction @@ -892,7 +894,10 @@ class IndexController extends AbstractAction
892 'num' => '5' 894 'num' => '5'
893 ) 895 )
894 ) 896 )
895 - ) 897 + ),
  898 + 'totalCount' => '2259',
  899 + 'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="ifont10">&gt;</span></a>'
  900 +
896 ) 901 )
897 ); 902 );
898 $this->_view->display('list', $data); 903 $this->_view->display('list', $data);