From 9413de29c74431781817e6902fcd967b9e280792 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Thu, 1 Dec 2022 17:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20checkoutService=20?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=20totalService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Shop/Services/CheckoutService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beike/Shop/Services/CheckoutService.php b/beike/Shop/Services/CheckoutService.php index 9434a5dd..22e435c7 100644 --- a/beike/Shop/Services/CheckoutService.php +++ b/beike/Shop/Services/CheckoutService.php @@ -30,6 +30,7 @@ class CheckoutService public $customer; public $cart; public $selectedProducts; + public $totalService; /** @@ -169,13 +170,13 @@ class CheckoutService $cartList = CartService::list($customer, true); $carts = CartService::reloadData($cartList); + $totalService = (new TotalService($currentCart, $cartList)); + $this->totalService = $totalService; $addresses = AddressRepo::listByCustomer($customer); $shipments = ShippingMethodService::getShippingMethods($this); $payments = PaymentMethodItem::collection(PluginRepo::getPaymentMethods())->jsonSerialize(); - $totalService = (new TotalService($currentCart, $cartList)); - $data = [ 'current' => [ 'shipping_address_id' => $currentCart->shipping_address_id,