...
|
...
|
@@ -52,17 +52,17 @@ class UserModel |
|
|
public static function getInfoNumData($uid, $udid)
|
|
|
{
|
|
|
$result = array(
|
|
|
'wait_pay_num' => 0,
|
|
|
'wait_cargo_num' => 0,
|
|
|
'send_cargo_num' => 0,
|
|
|
'brand_favorite_total' => 0,
|
|
|
'product_favorite_total' => 0,
|
|
|
'inbox_total' => 0,
|
|
|
'comment_total' => 0,
|
|
|
'refund_exchange_num' => 0,
|
|
|
'yoho_coin_num' => 0,
|
|
|
'coupon_num' => 0,
|
|
|
'product_browse' => 0
|
|
|
'wait_pay_num' => 0,
|
|
|
'wait_cargo_num' => 0,
|
|
|
'send_cargo_num' => 0,
|
|
|
'brand_favorite_total' => 0,
|
|
|
'product_favorite_total' => 0,
|
|
|
'inbox_total' => 0,
|
|
|
'comment_total' => 0,
|
|
|
'refund_exchange_num' => 0,
|
|
|
'yoho_coin_num' => 0,
|
|
|
'coupon_num' => 0,
|
|
|
'product_browse' => 0
|
|
|
);
|
|
|
|
|
|
// 调用接口获取个人中心页面优惠券,收藏的商品等的数目数据
|
...
|
...
|
@@ -187,9 +187,9 @@ class UserModel |
|
|
$datas = array();
|
|
|
$product = array();
|
|
|
foreach ($favProduct['data']['product_list'] as $val) {
|
|
|
if (empty($val['product_skn'])) {
|
|
|
continue;
|
|
|
}
|
|
|
if (empty($val['product_skn'])) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
$product = array();
|
|
|
$product['fav_id'] = $val['product_id'];
|
...
|
...
|
@@ -251,12 +251,12 @@ class UserModel |
|
|
// 处理品牌产品
|
|
|
$product = array();
|
|
|
foreach ($val['new_product'] as $one) {
|
|
|
if (empty($one['product_skn'])) {
|
|
|
continue;
|
|
|
}
|
|
|
if (empty($one['product_skn'])) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
$product = array();
|
|
|
$product['link'] = isset($one['goods'][0], $one['cnAlphabet']) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
|
|
|
$product['link'] = isset($one['goods'][0], $one['cnAlphabet']) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
|
|
|
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
|
|
|
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;
|
|
|
$product['discount'] = ($one['market_price'] > $one['sales_price']) ? '¥' . $one['sales_price'] : false;
|
...
|
...
|
@@ -320,7 +320,7 @@ class UserModel |
|
|
} else {
|
|
|
$data = $records['data']['product_list'];
|
|
|
foreach ($data as &$val) {
|
|
|
$val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
|
|
|
$val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
|
|
|
$val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
|
|
|
$val['sales_price'] = (!empty($val['sales_price']) && !is_float($val['sales_price'])) ? $val['sales_price'] . '.00' : $val['sales_price'];
|
|
|
$val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false;
|
...
|
...
|
@@ -761,14 +761,14 @@ class UserModel |
|
|
if (isset($helpListData['data']) && !empty($helpListData['data'])) {
|
|
|
$help = $helpListData['data'];
|
|
|
|
|
|
$one = array();
|
|
|
foreach ($help as $val) {
|
|
|
$one = array();
|
|
|
$one['name'] = $val['caption'];
|
|
|
$one['url'] = Helpers::url('/home/helpdetail/', array('code' => $val['code']));
|
|
|
$one = array();
|
|
|
foreach ($help as $val) {
|
|
|
$one = array();
|
|
|
$one['name'] = $val['caption'];
|
|
|
$one['url'] = Helpers::url('/home/helpdetail/', array('code' => $val['code']));
|
|
|
|
|
|
$result['iHelp'][] = $one;
|
|
|
}
|
|
|
$result['iHelp'][] = $one;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
|