wesmiler 2 месяцев назад
Родитель
Сommit
b8bc97716e
1 измененных файлов с 7 добавлено и 6 удалено
  1. 7 6
      app/Services/Api/GoodsService.php

+ 7 - 6
app/Services/Api/GoodsService.php

@@ -295,15 +295,16 @@ class GoodsService extends BaseService
                     $result['order_total'] += $total;
                     $result['count']++;
                 }
+            }
 
-                // 会员折扣
-                $orderTotal = $result['order_total'];
-                if($discountPoint>0 && $discountPoint<1){
-                    $result['order_total'] = moneyFormat((1-$discountPoint) * $result['order_total'],2);
-                    $result['discount_total'] = moneyFormat($orderTotal - $result['order_total'],2);
-                }
+            // 会员折扣
+            $orderTotal = $result['order_total'];
+            if($discountPoint>0 && $discountPoint<1){
+                $result['order_total'] = moneyFormat((1-$discountPoint) * $result['order_total'],2);
+                $result['discount_total'] = moneyFormat($orderTotal - $result['order_total'],2);
             }
 
+            $result['pay_total'] = moneyFormat($result['order_total'] + $result['delivery_fee'],2);
             return $result;
         }