- 添加了收货地址ID的空值检查 - 验证失败时返回相应的错误提示信息 - 确保在创建订单前必须选择有效的收货地址
@@ -77,6 +77,9 @@ class StoreOrder extends BaseController
if (!($count = count($cartId)) || $count != count($cartRepository->validIntersection($cartId, $uid)))
return app('json')->fail('已失效或已下单');
+ if (!$addressId) {
+ return app('json')->fail('请选择收货地址');
+ }
$orderInfo = $this->repository->cartIdByOrderInfo($uid, $cartId, $addressId,true,$psType);
$orderInfo['product_type']=0;
if($this->source=='yhc'){