From ab246422075685dab8ec96d890d792e5a38f55d3 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 22 Aug 2023 17:53:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=20=E6=97=A0=E7=89=A9=E6=B5=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Services/ShippingMethodService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beike/Services/ShippingMethodService.php b/beike/Services/ShippingMethodService.php index 37902630..b4388143 100644 --- a/beike/Services/ShippingMethodService.php +++ b/beike/Services/ShippingMethodService.php @@ -52,8 +52,9 @@ class ShippingMethodService } } // 获取根据收货地址 获取物流信息 - if($checkout->cart->guest_shipping_address || $checkout->cart->guest_payment_address){ - $address = $checkout->cart->guest_shipping_address ?? $checkout->cart->guest_payment_address; + $cart = $checkout->cart->toArray(); + $address = $checkout->cart->guest_shipping_address ?? $checkout->cart->guest_payment_address ?? $cart['payment_address'] ?? $cart['shipping_address']; + if($address){ $logisticsList = Logistics::getAll($address['country_id']); foreach($logisticsList as $logisticsItem){ $shippingMethods[] = [