修复异步加载收藏的商品以及收藏的品牌错误的bug
Showing
1 changed file
with
2 additions
and
6 deletions
@@ -172,12 +172,6 @@ class UserModel | @@ -172,12 +172,6 @@ class UserModel | ||
172 | 172 | ||
173 | // 处理用户收藏的商品数据 | 173 | // 处理用户收藏的商品数据 |
174 | if (isset($favProduct['data']) && !empty($favProduct['data']['product_list'])) { | 174 | if (isset($favProduct['data']) && !empty($favProduct['data']['product_list'])) { |
175 | - if ($page > $favProduct['data']['page_total']) { | ||
176 | - $result['end'] = true; | ||
177 | - | ||
178 | - return $result; | ||
179 | - } | ||
180 | - | ||
181 | $datas = array(); | 175 | $datas = array(); |
182 | $product = array(); | 176 | $product = array(); |
183 | foreach ($favProduct['data']['product_list'] as $val) { | 177 | foreach ($favProduct['data']['product_list'] as $val) { |
@@ -195,6 +189,8 @@ class UserModel | @@ -195,6 +189,8 @@ class UserModel | ||
195 | } | 189 | } |
196 | 190 | ||
197 | !empty($datas) && $result['hasFavProduct'] = $datas; | 191 | !empty($datas) && $result['hasFavProduct'] = $datas; |
192 | + } else if ($page > 1 && isset($favProduct['code']) && $favProduct['code'] === 500){ | ||
193 | + $result['end'] = true; | ||
198 | } | 194 | } |
199 | 195 | ||
200 | return $result; | 196 | return $result; |
-
Please register or login to post a comment