Showing
1 changed file
with
9 additions
and
6 deletions
@@ -330,7 +330,7 @@ class CartModel | @@ -330,7 +330,7 @@ class CartModel | ||
330 | // cookie保存的数据 | 330 | // cookie保存的数据 |
331 | if (!empty($cookieData)) { | 331 | if (!empty($cookieData)) { |
332 | $orderInfo = json_decode($cookieData, true); | 332 | $orderInfo = json_decode($cookieData, true); |
333 | -// $orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin']); | 333 | + $orderCompute = self::orderCompute($uid, $cartType, $orderInfo['deliveryId'], $orderInfo['paymentTypeId'], $orderInfo['couponCode'], $orderInfo['yohoCoin']); |
334 | } | 334 | } |
335 | 335 | ||
336 | // 根据地址id查询地址信息 | 336 | // 根据地址id查询地址信息 |
@@ -449,18 +449,21 @@ class CartModel | @@ -449,18 +449,21 @@ class CartModel | ||
449 | $one = array(); | 449 | $one = array(); |
450 | $one['id'] = $inv['invoices_type_id']; | 450 | $one['id'] = $inv['invoices_type_id']; |
451 | $one['name'] = $inv['invoices_type_name']; | 451 | $one['name'] = $inv['invoices_type_name']; |
452 | - $one['id'] == $orderInfo['invoiceType'] && $one['isSelected'] = true; | 452 | + isset($orderInfo['invoiceType']) && $one['id'] == $orderInfo['invoiceType'] && $one['isSelected'] = true; |
453 | 453 | ||
454 | $result['invoice'][] = $one; | 454 | $result['invoice'][] = $one; |
455 | } | 455 | } |
456 | 456 | ||
457 | // 发票信息需要记录 | 457 | // 发票信息需要记录 |
458 | - $result['needInvoice'] = $orderInfo['invoice']; | ||
459 | - $result['invoiceText'] = $orderInfo['invoiceText']; | 458 | + if (isset($orderInfo['invoice'])) { |
459 | + $result['needInvoice'] = $orderInfo['invoice']; | ||
460 | + $result['invoiceText'] = $orderInfo['invoiceText']; | ||
461 | + } | ||
462 | + | ||
460 | } | 463 | } |
461 | 464 | ||
462 | // 留言 | 465 | // 留言 |
463 | - $result['msg'] = $orderInfo['msg']; | 466 | + isset($orderInfo['msg']) && $result['msg'] = $orderInfo['msg']; |
464 | 467 | ||
465 | // 优惠券数据 | 468 | // 优惠券数据 |
466 | $coupons = array(); | 469 | $coupons = array(); |
@@ -572,7 +575,7 @@ class CartModel | @@ -572,7 +575,7 @@ class CartModel | ||
572 | $result = array(); | 575 | $result = array(); |
573 | 576 | ||
574 | $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $yohoCoin); | 577 | $orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $yohoCoin); |
575 | - if ($orderSubRes && isset($orderSubRes['code']) && $orderSubRes['code'] === 200) { | 578 | + if ($orderSubRes && isset($orderSubRes['code'])) { |
576 | $result = $orderSubRes; | 579 | $result = $orderSubRes; |
577 | } | 580 | } |
578 | 581 |
-
Please register or login to post a comment