...
|
...
|
@@ -151,7 +151,7 @@ class FavoriteModel |
|
|
$pageTotal = ceil($total / $limit); //总页数
|
|
|
$page = $page > $pageTotal ? $pageTotal : $page; //当前页超多总页数取总页数
|
|
|
$result['goods'] = self::getGoodsInfo($productList, $page, $limit); //收藏商品列表
|
|
|
$result['pager'] = self::getPager($page, $total, $pageTotal, $limit, $type);
|
|
|
$result['pager'] = self::getPager($page, $total, $pageTotal, $limit, $type, $sort);
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -304,7 +304,7 @@ class FavoriteModel |
|
|
* @param type $size 每页显示数量
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function getPager($page, $total, $totalPage, $size, $type)
|
|
|
public static function getPager($page, $total, $totalPage, $size, $type, $sort = 0)
|
|
|
{
|
|
|
$result = array();
|
|
|
if (isset($page) && isset($total) && isset($totalPage)) {
|
...
|
...
|
@@ -313,7 +313,7 @@ class FavoriteModel |
|
|
$result['totalPages'] = $totalPage;
|
|
|
$result['hasCheckAll'] = true;
|
|
|
$paging = new Paging('yoho');
|
|
|
$paging->setTotal($total)->setSize($size)->setQuery(array('page' => $page, 'type' => $type));
|
|
|
$paging->setTotal($total)->setSize($size)->setQuery(array('page' => $page, 'type' => $type, 'sort_id' => $sort));
|
|
|
$result['pagerHtml'] = $paging->view(false);
|
|
|
}
|
|
|
return $result;
|
...
|
...
|
|