From fce590d62384a83de0d71a006966cbc2cce421cf Mon Sep 17 00:00:00 2001 From: lqmac Date: Thu, 16 May 2024 11:30:24 +0800 Subject: [PATCH] 1 --- app/api/controller/Goods.php | 2 +- app/api/service/order/Checkout.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index b493c91f..de318ad0 100644 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -149,7 +149,7 @@ class Goods extends Controller 'state' => $res, 'goods_name' => $goods['goods_name'], 'goods_id' => $goods['goods_id'], - 'promise_info' => "预计".(GoodsDeliveryTime::data()[$goods['delivery_time']] ?? "72小时")."内发货", + 'promise_info' => "预计".(GoodsDeliveryTime::data()[$goods['delivery_time']]['name'] ?? "72小时")."内发货", ]; break; diff --git a/app/api/service/order/Checkout.php b/app/api/service/order/Checkout.php index 9a7109f8..74c79b5c 100644 --- a/app/api/service/order/Checkout.php +++ b/app/api/service/order/Checkout.php @@ -183,7 +183,7 @@ class Checkout extends BaseService continue; } - if (!in_array($this->orderData['address']->city_id, json_decode($value['region']))) { + if (isset($this->orderData['address']->city_id) && !in_array($this->orderData['address']->city_id, json_decode($value['region']))) { $this->setError("您的收货地址不在商品 [{$value['goods_name']}] 的销售区域内"); } }