Authored by Rock Zhang

修复加入购物车弹窗中价格显示的bug,统一显示接口返回的价格样式

Code Review By Rock Zhang
@@ -624,8 +624,8 @@ class Helpers @@ -624,8 +624,8 @@ class Helpers
624 $oneGoods['name'] = $single['product_name']; 624 $oneGoods['name'] = $single['product_name'];
625 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; 625 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : '';
626 $oneGoods['appearDate'] = '12月'; // 目前app接口没有返回该数据 626 $oneGoods['appearDate'] = '12月'; // 目前app接口没有返回该数据
627 - $oneGoods['price'] = $single['last_price'];  
628 - $oneGoods['marketPrice'] = $single['market_price']; 627 + $oneGoods['price'] = self::transPrice($single['last_price']);
  628 + $oneGoods['marketPrice'] = self::transPrice($single['market_price']);
629 $oneGoods['count'] = $single['storage_number']; 629 $oneGoods['count'] = $single['storage_number'];
630 630
631 $gift['goods'][] = $oneGoods; 631 $gift['goods'][] = $oneGoods;
@@ -13,9 +13,9 @@ @@ -13,9 +13,9 @@
13 <div class="text-info"> 13 <div class="text-info">
14 <p class="name">{{name}}</p> 14 <p class="name">{{name}}</p>
15 <p class="price"> 15 <p class="price">
16 - <span class="sale-price{{^price}} no-price{{/price}}">¥{{salePrice}}</span> 16 + <span class="sale-price{{^price}} no-price{{/price}}">{{salePrice}}</span>
17 {{#if price}} 17 {{#if price}}
18 - <span class="market-price">¥{{price}}</span> 18 + <span class="market-price">{{price}}</span>
19 {{/if}} 19 {{/if}}
20 </p> 20 </p>
21 </div> 21 </div>
@@ -623,8 +623,8 @@ class CartModel @@ -623,8 +623,8 @@ class CartModel
623 $data = array(); 623 $data = array();
624 624
625 $data['name'] = $productData['product_name']; 625 $data['name'] = $productData['product_name'];
626 - $data['price'] = Helpers::transPrice($productData['market_price']);  
627 - $data['salePrice'] = Helpers::transPrice($productData['sales_price']); 626 + $data['price'] = $productData['format_market_price'];
  627 + $data['salePrice'] = $productData['format_sales_price'];
628 628
629 if (isset($productData['storage_sum'])) { 629 if (isset($productData['storage_sum'])) {
630 $data['storage'] = $productData['storage_sum']; 630 $data['storage'] = $productData['storage_sum'];