Showing
1 changed file
with
6 additions
and
6 deletions
@@ -482,7 +482,6 @@ class CartModel | @@ -482,7 +482,6 @@ class CartModel | ||
482 | if (isset($payReturn['goods_list'])) { | 482 | if (isset($payReturn['goods_list'])) { |
483 | $oneGoods = array(); | 483 | $oneGoods = array(); |
484 | $goodsPrice = 0; | 484 | $goodsPrice = 0; |
485 | - $yohoCoinNumAll = 0; | ||
486 | 485 | ||
487 | foreach ($payReturn['goods_list'] as $single) { | 486 | foreach ($payReturn['goods_list'] as $single) { |
488 | $oneGoods = array(); | 487 | $oneGoods = array(); |
@@ -510,17 +509,13 @@ class CartModel | @@ -510,17 +509,13 @@ class CartModel | ||
510 | 509 | ||
511 | // 累加商品金额 | 510 | // 累加商品金额 |
512 | $goodsPrice += $oneGoods['count'] * $oneGoods['price']; | 511 | $goodsPrice += $oneGoods['count'] * $oneGoods['price']; |
513 | - $yohoCoinNumAll += $oneGoods['yohoCoinNum']; | ||
514 | 512 | ||
515 | $result['goods'][] = $oneGoods; | 513 | $result['goods'][] = $oneGoods; |
516 | } | 514 | } |
517 | 515 | ||
518 | // 商品金额 | 516 | // 商品金额 |
519 | $result['goodsPrice'] = Helpers::transPrice($goodsPrice); | 517 | $result['goodsPrice'] = Helpers::transPrice($goodsPrice); |
520 | - //$result['yohoCoinNum'] = $yohoCoinNumAll; | ||
521 | - if($yohoCoinNumAll > 0) { | ||
522 | - $result['yohoCoinNum'] = $yohoCoinNumAll; | ||
523 | - } | 518 | + |
524 | } | 519 | } |
525 | 520 | ||
526 | // 支付方式 | 521 | // 支付方式 |
@@ -580,6 +575,11 @@ class CartModel | @@ -580,6 +575,11 @@ class CartModel | ||
580 | $result['num'] = $payReturn['shopping_cart_data']['selected_goods_count']; | 575 | $result['num'] = $payReturn['shopping_cart_data']['selected_goods_count']; |
581 | // 商品金额 | 576 | // 商品金额 |
582 | // $result['goodsPrice'] = $payReturn['shopping_cart_data']['str_order_amount']; | 577 | // $result['goodsPrice'] = $payReturn['shopping_cart_data']['str_order_amount']; |
578 | + | ||
579 | + //有货币 | ||
580 | + if($payReturn['shopping_cart_data']['gain_yoho_coin'] > 0) { | ||
581 | + $result['yohoCoinNum'] = $payReturn['shopping_cart_data']['gain_yoho_coin']; | ||
582 | + } | ||
583 | } | 583 | } |
584 | 584 | ||
585 | // 发票有关数据 | 585 | // 发票有关数据 |
-
Please register or login to post a comment