Authored by hf

Merge remote-tracking branch 'origin/hotfix/yohocoinuse' into stable

@@ -200,9 +200,9 @@ class UserModel @@ -200,9 +200,9 @@ class UserModel
200 $product['imgUrl'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : ''; 200 $product['imgUrl'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
201 ; 201 ;
202 $product['title'] = $val['product_name']; 202 $product['title'] = $val['product_name'];
203 - $product['price'] = !empty($val['market_price']) ? '¥' . $val['market_price'] . '.00' : 0;  
204 - $product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . $val['sales_price'] . '.00' : false;  
205 - $product['savePrice'] = ($val['price_down'] > 0) ? '¥' . $val['price_down'] . '.00' : false; 203 + $product['price'] = '¥' . Helpers::transPrice($val['market_price']);
  204 + $product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . Helpers::transPrice($val['sales_price']) : false;
  205 + $product['savePrice'] = ($val['price_down'] > 0) ? '¥' . Helpers::transPrice($val['price_down']) : false;
206 $product['sellOut'] = ($val['storage'] <= 0); 206 $product['sellOut'] = ($val['storage'] <= 0);
207 207
208 $datas[] = $product; 208 $datas[] = $product;
@@ -254,8 +254,8 @@ class UserModel @@ -254,8 +254,8 @@ class UserModel
254 $product = array(); 254 $product = array();
255 $product['link'] = isset($one['goods'][0], $one['cnAlphabet']) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : ''; 255 $product['link'] = isset($one['goods'][0], $one['cnAlphabet']) ? Helpers::url('/product/pro_' . $one['product_id'] . '_' . $one['goods'][0]['id'] . '/' . $one['cnAlphabet'] . '.html') : '';
256 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : ''; 256 $product['imgUrl'] = (isset($one['default_images']) && !empty($one['default_images'])) ? Images::getImageUrl($one['default_images'], 235, 314) : '';
257 - $product['price'] = !empty($one['market_price']) ? '¥' . $one['market_price'] : 0;  
258 - $product['discount'] = ($one['market_price'] > $one['sales_price']) ? '¥' . $one['sales_price'] : false; 257 + $product['price'] = '¥' . Helpers::transPrice($one['market_price']);
  258 + $product['discount'] = ($one['market_price'] > $one['sales_price']) ? '¥' . Helpers::transPrice($one['sales_price']) : false;
259 259
260 $brand['productList'][] = $product; 260 $brand['productList'][] = $product;
261 } 261 }
@@ -319,7 +319,7 @@ class UserModel @@ -319,7 +319,7 @@ class UserModel
319 $val['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html'); 319 $val['link'] = Helpers::url('/product/show_' . $val['product_skn'] . '.html');
320 $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : ''; 320 $val['image'] = !empty($val['image']) ? Helpers::getImageUrl($val['image'], 447, 596) : '';
321 $val['sales_price'] = Helpers::transPrice($val['sales_price']); 321 $val['sales_price'] = Helpers::transPrice($val['sales_price']);
322 - $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? $val['market_price'] . '.00' : false; 322 + $val['market_price'] = ($val['market_price'] - $val['sales_price'] > 0) ? Helpers::transPrice($val['market_price']) : false;
323 } 323 }
324 !empty($data) && $result['browseRecord'] = $data; 324 !empty($data) && $result['browseRecord'] = $data;
325 } 325 }