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']}] 的销售区域内"); } }