...
|
...
|
@@ -237,6 +237,7 @@ class UserModel |
|
|
$product = array();
|
|
|
foreach ($val['new_product'] as $one) {
|
|
|
$product = array();
|
|
|
$product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['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'] . '.00' : 0;
|
|
|
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] . '.00' : 0;
|
...
|
...
|
@@ -300,7 +301,8 @@ class UserModel |
|
|
} else {
|
|
|
$data = $records['data']['product_list'];
|
|
|
foreach ($data as &$val) {
|
|
|
$val['image'] = Helpers::getImageUrl($val['image'], 140, 140);
|
|
|
$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'], 140, 140) : '';
|
|
|
$val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0;
|
|
|
$val['market_price'] = !empty($val['market_price']) ? $val['market_price'] . '.00' : 0;
|
|
|
}
|
...
|
...
|
@@ -334,7 +336,7 @@ class UserModel |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 处理YOHO币数据
|
|
|
* 处理YOHO币总数数据
|
|
|
*
|
|
|
* @param int $uid 用户ID
|
|
|
* @return array|mixed 处理之后的YOHO币数据
|
...
|
...
|
@@ -344,7 +346,7 @@ class UserModel |
|
|
$result = array();
|
|
|
|
|
|
// 调用接口获取YOHO币
|
|
|
$yohoCoin = UserData::yohoCoinData($uid);
|
|
|
$yohoCoin = UserData::yohoCoinTotal($uid);
|
|
|
|
|
|
// 处理YOHO币数据
|
|
|
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
|
...
|
...
|
|