Authored by 郝肖肖

h5 支付方式,默认第一个

... ... @@ -487,6 +487,7 @@ class CartModel
// 支付方式
if (isset($payReturn['payment_way'])) {
$onePay = array();
$isPaymentType = true;
foreach ($payReturn['payment_way'] as $pay) {
if ($pay['is_support'] !== 'Y') {
continue;
... ... @@ -500,10 +501,16 @@ class CartModel
// $onePay['default'] = ($pay['default'] === 'Y');
if (isset($orderInfo['paymentType']) && $onePay['paymentType'] === $orderInfo['paymentType']) {
$onePay['recommend'] = true;
$isPaymentType = false;
}
$result['paymentWay'][] = $onePay;
}
//默认第一个
if ($isPaymentType) {
$result['paymentWay'][0]['recommend'] = true;
}
}
// 有货币
... ...