|
@@ -188,7 +188,7 @@ class UserModel |
|
@@ -188,7 +188,7 @@ class UserModel |
188
|
$favProduct = UserData::favoriteProductData($uid, $page, $limit);
|
188
|
$favProduct = UserData::favoriteProductData($uid, $page, $limit);
|
189
|
|
189
|
|
190
|
// 处理用户收藏的商品数据
|
190
|
// 处理用户收藏的商品数据
|
191
|
- if (isset($favProduct['data']) && !empty($favProduct['data']['product_list'])) {
|
191
|
+ if (isset($favProduct['data']) && $page <= $favProduct['data']['page_total']) {
|
192
|
$datas = array();
|
192
|
$datas = array();
|
193
|
$product = array();
|
193
|
$product = array();
|
194
|
foreach ($favProduct['data']['product_list'] as $val) {
|
194
|
foreach ($favProduct['data']['product_list'] as $val) {
|
|
@@ -210,7 +210,7 @@ class UserModel |
|
@@ -210,7 +210,7 @@ class UserModel |
210
|
$datas[] = $product;
|
210
|
$datas[] = $product;
|
211
|
}
|
211
|
}
|
212
|
!empty($datas) && $result['hasFavProduct'] = $datas;
|
212
|
!empty($datas) && $result['hasFavProduct'] = $datas;
|
213
|
- } else if ($page > 1 && !isset($favProduct['data']['product_list'])) {
|
213
|
+ } else if (($page > 1 && !$favProduct) || $page > $favProduct['data']['page_total']) {
|
214
|
$result['end'] = true;
|
214
|
$result['end'] = true;
|
215
|
}
|
215
|
}
|
216
|
|
216
|
|
|
@@ -234,7 +234,7 @@ class UserModel |
|
@@ -234,7 +234,7 @@ class UserModel |
234
|
$favBrand = UserData::favoriteBrandData($uid, $gender, $page, $limit);
|
234
|
$favBrand = UserData::favoriteBrandData($uid, $gender, $page, $limit);
|
235
|
|
235
|
|
236
|
// 处理用户收藏的品牌数据
|
236
|
// 处理用户收藏的品牌数据
|
237
|
- if (isset($favBrand['data']) && !empty($favBrand['data']['brand_list'])) {
|
237
|
+ if (isset($favBrand['data']) && $page <= $favBrand['data']['page_total']) {
|
238
|
$datas = array();
|
238
|
$datas = array();
|
239
|
$brand = array();
|
239
|
$brand = array();
|
240
|
foreach ($favBrand['data']['brand_list'] as $val) {
|
240
|
foreach ($favBrand['data']['brand_list'] as $val) {
|
|
@@ -265,7 +265,7 @@ class UserModel |
|
@@ -265,7 +265,7 @@ class UserModel |
265
|
$datas[] = $brand;
|
265
|
$datas[] = $brand;
|
266
|
}
|
266
|
}
|
267
|
!empty($datas) && $result['hasFavBrand'] = $datas;
|
267
|
!empty($datas) && $result['hasFavBrand'] = $datas;
|
268
|
- } else if ($page > 1 && !isset($favBrand['code']['brand_list'])) {
|
268
|
+ } else if (($page > 1 && !$favBrand) || $page > $favBrand['data']['page_total']) {
|
269
|
$result['end'] = true;
|
269
|
$result['end'] = true;
|
270
|
}
|
270
|
}
|
271
|
|
271
|
|