Showing
1 changed file
with
7 additions
and
0 deletions
@@ -487,6 +487,7 @@ class CartModel | @@ -487,6 +487,7 @@ class CartModel | ||
487 | // 支付方式 | 487 | // 支付方式 |
488 | if (isset($payReturn['payment_way'])) { | 488 | if (isset($payReturn['payment_way'])) { |
489 | $onePay = array(); | 489 | $onePay = array(); |
490 | + $isPaymentType = true; | ||
490 | foreach ($payReturn['payment_way'] as $pay) { | 491 | foreach ($payReturn['payment_way'] as $pay) { |
491 | if ($pay['is_support'] !== 'Y') { | 492 | if ($pay['is_support'] !== 'Y') { |
492 | continue; | 493 | continue; |
@@ -500,10 +501,16 @@ class CartModel | @@ -500,10 +501,16 @@ class CartModel | ||
500 | // $onePay['default'] = ($pay['default'] === 'Y'); | 501 | // $onePay['default'] = ($pay['default'] === 'Y'); |
501 | if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) { | 502 | if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) { |
502 | $onePay['recommend'] = true; | 503 | $onePay['recommend'] = true; |
504 | + $isPaymentType = false; | ||
503 | } | 505 | } |
504 | 506 | ||
505 | $result['paymentWay'][] = $onePay; | 507 | $result['paymentWay'][] = $onePay; |
506 | } | 508 | } |
509 | + | ||
510 | + //默认第一个 | ||
511 | + if ($isPaymentType) { | ||
512 | + $result['paymentWay'][0]['recommend'] = true; | ||
513 | + } | ||
507 | } | 514 | } |
508 | 515 | ||
509 | // 有货币 | 516 | // 有货币 |
-
Please register or login to post a comment