...
|
...
|
@@ -370,7 +370,7 @@ class CartModel |
|
|
|
|
|
// cookie保存的数据
|
|
|
if (!empty($orderInfo)) {
|
|
|
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
|
|
|
$orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentType'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
|
|
|
}
|
|
|
|
|
|
// 根据地址id查询地址信息
|
...
|
...
|
@@ -394,10 +394,9 @@ class CartModel |
|
|
|
|
|
// 配送方式
|
|
|
if (isset($payReturn['delivery_way'])) {
|
|
|
$idArr = array();
|
|
|
$defaultKey = 0;
|
|
|
$oneDeliv = array();
|
|
|
|
|
|
$isDeliveryId = true;
|
|
|
$deliveries = $payReturn['delivery_way'];
|
|
|
if (isset($orderCompute['delivery_way']) && !empty($orderCompute['delivery_way'])) {
|
|
|
$deliveries = $orderCompute['delivery_way'];
|
...
|
...
|
@@ -414,15 +413,15 @@ class CartModel |
|
|
$oneDeliv['cost'] = $val['delivery_way_cost'];
|
|
|
($val['default'] === 'Y') && $defaultKey = $key;
|
|
|
|
|
|
$idArr[$key] = $oneDeliv['id'];
|
|
|
if (isset($orderInfo['deliveryId']) && $orderInfo['deliveryId'] === $oneDeliv['id']) {
|
|
|
$oneDeliv['isSelected'] = true;
|
|
|
$isDeliveryId = false;
|
|
|
}
|
|
|
|
|
|
$result['dispatchMode'][$key] = $oneDeliv;
|
|
|
}
|
|
|
|
|
|
if (isset($orderInfo['deliveryId']) && isset($idArr[$orderInfo['deliveryId']])) {
|
|
|
$flag = array_search($orderInfo['deliveryId'], $idArr);
|
|
|
$flag !== false && $result['dispatchMode'][$flag]['isSelected'] = true;
|
|
|
} else {
|
|
|
if ($isDeliveryId) {
|
|
|
$result['dispatchMode'][$defaultKey]['isSelected'] = true;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -499,7 +498,7 @@ class CartModel |
|
|
$onePay['name'] = $pay['payment_type_name'];
|
|
|
$onePay['isSupport'] = $pay['is_support'] === 'Y';
|
|
|
// $onePay['default'] = ($pay['default'] === 'Y');
|
|
|
if ($onePay['paymentType'] == 1) {
|
|
|
if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) {
|
|
|
$onePay['recommend'] = true;
|
|
|
}
|
|
|
|
...
|
...
|
|