Authored by 郭成尧

'购物车为你优选翻页'

... ... @@ -235,7 +235,11 @@ $shopCart.on('click', '.icon-minus, .icon-add', function() {
// 最近浏览翻页
$histroy.on('click', '.pagenext, .pageprev', function() {
if ($(this).hasClass('pagenext')) {
pageNum++;
if (pageNum !== 6) {
pageNum++;
} else {
pageNum = 1;
}
} else {
--pageNum > 0 || (pageNum = 1);
}
... ...
... ... @@ -518,6 +518,17 @@ class CartModel
$result['data']['hasPrev'] = false;
$result['data']['hasNext'] = false;
}
// 到达第六页,没有下一页
if ($page == 6) {
$result['data']['hasNext'] = false;
}
// 第-页,没有上一页
if ($page == 1) {
$result['data']['hasPrev'] = false;
}
} while (false);
return $result;
... ...
... ... @@ -188,6 +188,10 @@ class IndexController extends WebAction
$udid = $uid . $this->getUdid();
$page = $this->get('page', 1);
if ($page === '7') {
$page = 1;
}
$result = CartModel::getRecommendProduct($channel, $uid, $udid, $page);
}
... ...