lqmac 6 months ago
parent 518a6e74c9
commit fce590d623
  1. 2
      app/api/controller/Goods.php
  2. 2
      app/api/service/order/Checkout.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;

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

Loading…
Cancel
Save