Authored by uedxwg

结算数据保存

... ... @@ -238,11 +238,16 @@ if (!orderInfo('addressId')) {
orderInfo('addressId', $addressWrap.data('id'));
}
$('.dispatch-mode').on('touchend', 'li', function() {
orderInfo('deliveryId', $(this).data('id'));
$('.delivery-id').on('touchend', 'li', function() {
console.log($(this) .data('id'));
orderInfo('paymentTypeId', $(this).data('id'));
orderCompute();
});
$('.payment-type').on('touchend', 'li', function() {
orderInfo('paymentType', $('.icon-cb-radio', this).data('id'));
});
$('.dispatch-time').on('touchend', 'li', function() {
orderInfo('deliveryTimeId', $(this).data('id'));
});
... ...
... ... @@ -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['paymentTypeId'] $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList);
}
// 根据地址id查询地址信息
... ... @@ -499,7 +499,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;
}
... ...
... ... @@ -296,6 +296,7 @@ class IndexController extends AbstractAction
$orderInfo = array();
if (!empty($cookieData)) {
$orderInfo = json_decode($cookieData, true);
// print_r($orderInfo);exit();
$cartType = $orderInfo['cartType'];
}
... ... @@ -329,7 +330,7 @@ class IndexController extends AbstractAction
'isOrdinaryCart' => ($cartType !== 'advance'),
'orderEnsure' => $order
);
print_r($data);
$this->setTitle('确认订单');
$this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮
$this->_view->display('order-ensure', $data);
... ...