...
|
...
|
@@ -180,16 +180,16 @@ class UserModel |
|
|
|
|
|
$datas = array();
|
|
|
$product = array();
|
|
|
|
|
|
foreach ($favProduct['data']['product_list'] as $val) {
|
|
|
$product = array();
|
|
|
$product['fav_id'] = $val['product_id'];
|
|
|
$product['imgUrl'] = $val['image'];
|
|
|
$product['link'] = Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html');
|
|
|
$product['imgUrl'] = Helpers::getImageUrl($val['image'], 447, 596);;
|
|
|
$product['title'] = $val['product_name'];
|
|
|
$product['price'] = !empty($val['market_price']) ? '¥'.$val['market_price'] . '.00' : 0;
|
|
|
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . $val['sales_price'] . '.00' : false;
|
|
|
$product['savePrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥'.($val['market_price'] - $val['sales_price']) . '.00' : false;
|
|
|
$product['sellOut'] = (bool)($val['price_down']);
|
|
|
$product['savePrice'] = !empty($val['price_down'] > 0) ? '¥'.$val['price_down'] . '.00' : false;
|
|
|
$product['sellOut'] = ($val['storage'] <= 0);
|
|
|
|
|
|
$datas[] = $product;
|
|
|
}
|
...
|
...
|
@@ -230,19 +230,19 @@ class UserModel |
|
|
foreach ($favBrand['data']['brand_list'] as $val) {
|
|
|
$brand = array();
|
|
|
$brand['id'] = $val['brand_id'];
|
|
|
$brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314);
|
|
|
$brand['brandImg'] = !empty($val['brand_ico']) ? Images::getImageUrl($val['brand_ico'], 235, 314) : '';
|
|
|
$brand['brandName'] = $val['brand_name'];
|
|
|
$brand['update'] = $val['new_product_num'];
|
|
|
$brand['discount'] = $val['product_discount_num'];
|
|
|
$brand['link'] = '#';
|
|
|
$brand['link'] = Helpers::url('', array('query' => $val['brand_name']), 'search');
|
|
|
|
|
|
// 处理品牌产品
|
|
|
$product = array();
|
|
|
foreach ($val['new_product'] as $one) {
|
|
|
$product = array();
|
|
|
$product['imgUrl'] = Images::getImageUrl($one['default_images'], 235, 314);
|
|
|
$product['price'] = '¥'.$one['market_price'];
|
|
|
$product['discount'] = '¥'.$one['sales_price'];
|
|
|
$product['price'] = !empty($one['market_price']) ? '¥'.$one['market_price'] . '.00' : 0;
|
|
|
$product['discount'] = !empty($one['sales_price']) ? '¥'.$one['sales_price'] . '.00' : 0;
|
|
|
|
|
|
$brand['productList'][] = $product;
|
|
|
}
|
...
|
...
|
|