|
@@ -194,12 +194,12 @@ class UserModel |
|
@@ -194,12 +194,12 @@ class UserModel |
194
|
$favProduct = UserData::favoriteProductData($uid);
|
194
|
$favProduct = UserData::favoriteProductData($uid);
|
195
|
|
195
|
|
196
|
// 处理用户收藏的商品数据
|
196
|
// 处理用户收藏的商品数据
|
197
|
- if (isset($favProduct['data']) && !empty($favProduct['data'])) {
|
197
|
+ if (isset($favProduct['list']) && !empty($favProduct['list'])) {
|
198
|
$product = array();
|
198
|
$product = array();
|
199
|
- foreach ($favProduct['data']['product_list'] as $val) {
|
199
|
+ foreach ($favProduct['list'] as $val) {
|
200
|
$product = array();
|
200
|
$product = array();
|
201
|
$product['fav_id'] = $val['product_id'];
|
201
|
$product['fav_id'] = $val['product_id'];
|
202
|
- $product['imgUrl'] = $val['image'];
|
202
|
+ $product['imgUrl'] = Helpers::getImageUrl($val['image'], 140, 140);
|
203
|
$product['title'] = $val['product_name'];
|
203
|
$product['title'] = $val['product_name'];
|
204
|
$product['price'] = '¥'.$val['market_price'];
|
204
|
$product['price'] = '¥'.$val['market_price'];
|
205
|
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥'.$val['sales_price'] : false;
|
205
|
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥'.$val['sales_price'] : false;
|
|
@@ -231,9 +231,9 @@ class UserModel |
|
@@ -231,9 +231,9 @@ class UserModel |
231
|
$favBrand = UserData::favoriteBrandData($uid, $size, $page, $limit);
|
231
|
$favBrand = UserData::favoriteBrandData($uid, $size, $page, $limit);
|
232
|
|
232
|
|
233
|
// 处理用户收藏的品牌数据
|
233
|
// 处理用户收藏的品牌数据
|
234
|
- if (isset($favBrand['data']) && !empty($favBrand['data'])) {
|
234
|
+ if (isset($favBrand['list']) && !empty($favBrand['list'])) {
|
235
|
$brand = array();
|
235
|
$brand = array();
|
236
|
- foreach ($favBrand['data']['brand_list'] as $val) {
|
236
|
+ foreach ($favBrand['list'] as $val) {
|
237
|
$brand = array();
|
237
|
$brand = array();
|
238
|
$brand['id'] = $val['brand_id'];
|
238
|
$brand['id'] = $val['brand_id'];
|
239
|
$brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314);
|
239
|
$brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314);
|