Authored by 毕凯

Merge branch 'hotfix/wechatAlipay'

... ... @@ -115,9 +115,22 @@ function hideWeChatPay() {
});
}
function hideAliPay() {
var $payApps = $('.app');
$payApps.each(function(idx, app) {
if ($(app).parent().attr('id') === 'alipay') {
$(app).closest('a').css('display', 'none');
return false;
}
});
}
function handleForWX() {
if (!isWXOpen()) {
hideWeChatPay();
} else {
hideAliPay();
}
}
... ...
... ... @@ -991,27 +991,28 @@ class HomeController extends AbstractAction
}
}
}
$payList = array(
0 => array(
'appIcon' => '',
'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),
'appId' => 'alipay',
'app' => '支付宝支付',
'hint' => '支付宝钱包支付',
'subHint' => '推荐支付宝用户使用'
),
1 => array(
'appIcon' => '',
'payLink' => '',
'appId' => 'weixin',
'app' => '微信支付',
'hint' => '推荐使用',
'subHint' => ''
),
);
$this->_view->display('pay', array(
'payCenterPage' => true,
'payAppInfo' => array(
0 => array(
'appIcon' => '',
'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),
'appId' => 'alipay',
'app' => '支付宝支付',
'hint' => '支付宝钱包支付',
'subHint' => '推荐支付宝用户使用',
),
1 => array(
'appIcon' => '',
'payLink' => '',
'appId' => 'weixin',
'app' => '微信支付',
'hint' => '推荐使用',
'subHint' => '',
),
),
'payAppInfo' => $payList,
'hasWxShare' => $hasWxShare,
'orderCode' => $orderCode,
'orderTotal' => isset($orderDetail['goodsAmount']) ? $orderDetail['goodsAmount'] : 0,
... ...