Showing
1 changed file
with
3 additions
and
3 deletions
@@ -151,7 +151,7 @@ class FavoriteModel | @@ -151,7 +151,7 @@ class FavoriteModel | ||
151 | $pageTotal = ceil($total / $limit); //总页数 | 151 | $pageTotal = ceil($total / $limit); //总页数 |
152 | $page = $page > $pageTotal ? $pageTotal : $page; //当前页超多总页数取总页数 | 152 | $page = $page > $pageTotal ? $pageTotal : $page; //当前页超多总页数取总页数 |
153 | $result['goods'] = self::getGoodsInfo($productList, $page, $limit); //收藏商品列表 | 153 | $result['goods'] = self::getGoodsInfo($productList, $page, $limit); //收藏商品列表 |
154 | - $result['pager'] = self::getPager($page, $total, $pageTotal, $limit, $type); | 154 | + $result['pager'] = self::getPager($page, $total, $pageTotal, $limit, $type, $sort); |
155 | return $result; | 155 | return $result; |
156 | } | 156 | } |
157 | 157 | ||
@@ -304,7 +304,7 @@ class FavoriteModel | @@ -304,7 +304,7 @@ class FavoriteModel | ||
304 | * @param type $size 每页显示数量 | 304 | * @param type $size 每页显示数量 |
305 | * @return type | 305 | * @return type |
306 | */ | 306 | */ |
307 | - public static function getPager($page, $total, $totalPage, $size, $type) | 307 | + public static function getPager($page, $total, $totalPage, $size, $type, $sort = 0) |
308 | { | 308 | { |
309 | $result = array(); | 309 | $result = array(); |
310 | if (isset($page) && isset($total) && isset($totalPage)) { | 310 | if (isset($page) && isset($total) && isset($totalPage)) { |
@@ -313,7 +313,7 @@ class FavoriteModel | @@ -313,7 +313,7 @@ class FavoriteModel | ||
313 | $result['totalPages'] = $totalPage; | 313 | $result['totalPages'] = $totalPage; |
314 | $result['hasCheckAll'] = true; | 314 | $result['hasCheckAll'] = true; |
315 | $paging = new Paging('yoho'); | 315 | $paging = new Paging('yoho'); |
316 | - $paging->setTotal($total)->setSize($size)->setQuery(array('page' => $page, 'type' => $type)); | 316 | + $paging->setTotal($total)->setSize($size)->setQuery(array('page' => $page, 'type' => $type, 'sort_id' => $sort)); |
317 | $result['pagerHtml'] = $paging->view(false); | 317 | $result['pagerHtml'] = $paging->view(false); |
318 | } | 318 | } |
319 | return $result; | 319 | return $result; |
-
Please register or login to post a comment