...
|
...
|
@@ -336,28 +336,22 @@ class CartModel |
|
|
'buy_number' => $buyNumber
|
|
|
)
|
|
|
));
|
|
|
$result['isLimit'] = true;
|
|
|
}
|
|
|
|
|
|
$pay = CartData::cartPay($uid, $cartType, 0, $skuList);
|
|
|
|
|
|
// 限购商品结算接口返回逻辑判定
|
|
|
if ($isLimitGoods) {
|
|
|
if (!$pay) {
|
|
|
$result['needReload'] = true;
|
|
|
} elseif (isset($pay['code']) && $pay['code'] != 200) {
|
|
|
$result['error'] = true;
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
do {
|
|
|
if (!$pay || $pay['code'] != 200 || empty($pay['data']['goods_list'])) {
|
|
|
if ($isLimitGoods) {
|
|
|
$result['error'] = true;
|
|
|
} else {
|
|
|
$result['cartUrl'] = Helpers::url('/cart/index/index');
|
|
|
}
|
|
|
|
|
|
// 普通或者预售商品为空返回
|
|
|
if (!$pay || empty($pay['data']['goods_list'])) {
|
|
|
$result['cartUrl'] = Helpers::url('/cart/index/index');
|
|
|
return $result;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if ($pay && isset($pay['code']) && $pay['code'] === 200) {
|
|
|
$payReturn = $pay['data'];
|
|
|
$address = array();
|
|
|
$orderCompute = array();
|
...
|
...
|
@@ -518,7 +512,8 @@ class CartModel |
|
|
$coupons['couponName'] = $orderInfo['couponName'];
|
|
|
}
|
|
|
$result['coupon'] = $coupons;
|
|
|
}
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
return $result;
|
|
|
}
|
...
|
...
|
|