Showing
3 changed files
with
11 additions
and
5 deletions
@@ -238,11 +238,16 @@ if (!orderInfo('addressId')) { | @@ -238,11 +238,16 @@ if (!orderInfo('addressId')) { | ||
238 | orderInfo('addressId', $addressWrap.data('id')); | 238 | orderInfo('addressId', $addressWrap.data('id')); |
239 | } | 239 | } |
240 | 240 | ||
241 | -$('.dispatch-mode').on('touchend', 'li', function() { | ||
242 | - orderInfo('deliveryId', $(this).data('id')); | 241 | +$('.delivery-id').on('touchend', 'li', function() { |
242 | + console.log($(this) .data('id')); | ||
243 | + orderInfo('paymentTypeId', $(this).data('id')); | ||
243 | orderCompute(); | 244 | orderCompute(); |
244 | }); | 245 | }); |
245 | 246 | ||
247 | +$('.payment-type').on('touchend', 'li', function() { | ||
248 | + orderInfo('paymentType', $('.icon-cb-radio', this).data('id')); | ||
249 | +}); | ||
250 | + | ||
246 | $('.dispatch-time').on('touchend', 'li', function() { | 251 | $('.dispatch-time').on('touchend', 'li', function() { |
247 | orderInfo('deliveryTimeId', $(this).data('id')); | 252 | orderInfo('deliveryTimeId', $(this).data('id')); |
248 | }); | 253 | }); |
@@ -370,7 +370,7 @@ class CartModel | @@ -370,7 +370,7 @@ class CartModel | ||
370 | 370 | ||
371 | // cookie保存的数据 | 371 | // cookie保存的数据 |
372 | if (!empty($orderInfo)) { | 372 | if (!empty($orderInfo)) { |
373 | - $orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList); | 373 | + $orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentType'], $orderInfo['paymentTypeId'] $orderInfo['couponCode'], $orderInfo['yohoCoin'], $skuList); |
374 | } | 374 | } |
375 | 375 | ||
376 | // 根据地址id查询地址信息 | 376 | // 根据地址id查询地址信息 |
@@ -499,7 +499,7 @@ class CartModel | @@ -499,7 +499,7 @@ class CartModel | ||
499 | $onePay['name'] = $pay['payment_type_name']; | 499 | $onePay['name'] = $pay['payment_type_name']; |
500 | $onePay['isSupport'] = $pay['is_support'] === 'Y'; | 500 | $onePay['isSupport'] = $pay['is_support'] === 'Y'; |
501 | // $onePay['default'] = ($pay['default'] === 'Y'); | 501 | // $onePay['default'] = ($pay['default'] === 'Y'); |
502 | - if ($onePay['paymentType'] == 1) { | 502 | + if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) { |
503 | $onePay['recommend'] = true; | 503 | $onePay['recommend'] = true; |
504 | } | 504 | } |
505 | 505 |
@@ -296,6 +296,7 @@ class IndexController extends AbstractAction | @@ -296,6 +296,7 @@ class IndexController extends AbstractAction | ||
296 | $orderInfo = array(); | 296 | $orderInfo = array(); |
297 | if (!empty($cookieData)) { | 297 | if (!empty($cookieData)) { |
298 | $orderInfo = json_decode($cookieData, true); | 298 | $orderInfo = json_decode($cookieData, true); |
299 | + // print_r($orderInfo);exit(); | ||
299 | $cartType = $orderInfo['cartType']; | 300 | $cartType = $orderInfo['cartType']; |
300 | } | 301 | } |
301 | 302 | ||
@@ -329,7 +330,7 @@ class IndexController extends AbstractAction | @@ -329,7 +330,7 @@ class IndexController extends AbstractAction | ||
329 | 'isOrdinaryCart' => ($cartType !== 'advance'), | 330 | 'isOrdinaryCart' => ($cartType !== 'advance'), |
330 | 'orderEnsure' => $order | 331 | 'orderEnsure' => $order |
331 | ); | 332 | ); |
332 | - | 333 | + print_r($data); |
333 | $this->setTitle('确认订单'); | 334 | $this->setTitle('确认订单'); |
334 | $this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮 | 335 | $this->setNavHeader('确认订单', $returnUrl, false); // 不显示右上角home按钮 |
335 | $this->_view->display('order-ensure', $data); | 336 | $this->_view->display('order-ensure', $data); |
-
Please register or login to post a comment