Authored by 毕凯

微信访问隐藏支付宝

... ... @@ -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();
}
}
... ...
... ... @@ -998,7 +998,7 @@ class HomeController extends AbstractAction
'appId' => 'alipay',
'app' => '支付宝支付',
'hint' => '支付宝钱包支付',
'subHint' => '推荐支付宝用户使用',
'subHint' => '推荐支付宝用户使用'
),
1 => array(
'appIcon' => '',
... ... @@ -1006,14 +1006,10 @@ class HomeController extends AbstractAction
'appId' => 'weixin',
'app' => '微信支付',
'hint' => '推荐使用',
'subHint' => '',
'subHint' => ''
),
);
if (stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false) {
unset($payList[0]);
}
$this->_view->display('pay', array(
'payCenterPage' => true,
'payAppInfo' => $payList,
... ...