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[] = [