|
@@ -237,6 +237,7 @@ class UserModel |
|
@@ -237,6 +237,7 @@ class UserModel |
237
|
$product = array();
|
237
|
$product = array();
|
238
|
foreach ($val['new_product'] as $one) {
|
238
|
foreach ($val['new_product'] as $one) {
|
239
|
$product = array();
|
239
|
$product = array();
|
|
|
240
|
+ $product['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
|
240
|
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
|
241
|
$product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
|
241
|
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] . '.00' : 0;
|
242
|
$product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] . '.00' : 0;
|
242
|
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] . '.00' : 0;
|
243
|
$product['discount'] = !empty($one['sales_price']) ? '¥' . $one['sales_price'] . '.00' : 0;
|
|
@@ -300,7 +301,8 @@ class UserModel |
|
@@ -300,7 +301,8 @@ class UserModel |
300
|
} else {
|
301
|
} else {
|
301
|
$data = $records['data']['product_list'];
|
302
|
$data = $records['data']['product_list'];
|
302
|
foreach ($data as &$val) {
|
303
|
foreach ($data as &$val) {
|
303
|
- $val['image'] = Helpers::getImageUrl($val['image'], 140, 140);
|
304
|
+ $val['link'] = isset($val['goodsId']) ? Helpers::url('/product/pro_' . $val['product_skn'] . '_' . $val['goodsId'] . '/' . $val['cnAlphabet'] . '.html') : '';
|
|
|
305
|
+ $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 140, 140) : '';
|
304
|
$val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0;
|
306
|
$val['sales_price'] = !empty($val['sales_price']) ? $val['sales_price'] . '.00' : 0;
|
305
|
$val['market_price'] = !empty($val['market_price']) ? $val['market_price'] . '.00' : 0;
|
307
|
$val['market_price'] = !empty($val['market_price']) ? $val['market_price'] . '.00' : 0;
|
306
|
}
|
308
|
}
|
|
@@ -334,7 +336,7 @@ class UserModel |
|
@@ -334,7 +336,7 @@ class UserModel |
334
|
}
|
336
|
}
|
335
|
|
337
|
|
336
|
/**
|
338
|
/**
|
337
|
- * 处理YOHO币数据
|
339
|
+ * 处理YOHO币总数数据
|
338
|
*
|
340
|
*
|
339
|
* @param int $uid 用户ID
|
341
|
* @param int $uid 用户ID
|
340
|
* @return array|mixed 处理之后的YOHO币数据
|
342
|
* @return array|mixed 处理之后的YOHO币数据
|
|
@@ -344,7 +346,7 @@ class UserModel |
|
@@ -344,7 +346,7 @@ class UserModel |
344
|
$result = array();
|
346
|
$result = array();
|
345
|
|
347
|
|
346
|
// 调用接口获取YOHO币
|
348
|
// 调用接口获取YOHO币
|
347
|
- $yohoCoin = UserData::yohoCoinData($uid);
|
349
|
+ $yohoCoin = UserData::yohoCoinTotal($uid);
|
348
|
|
350
|
|
349
|
// 处理YOHO币数据
|
351
|
// 处理YOHO币数据
|
350
|
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
|
352
|
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
|