...
|
...
|
@@ -23,10 +23,10 @@ var richTip = require('../plugin/rich-tip'); |
|
|
// 点击微信显示加载
|
|
|
var $loadingToast = $('.loading-toast');
|
|
|
|
|
|
/* TODO 影响加载此段 JS */
|
|
|
var theOrderCode = document.getElementById('ordercode') ? document.getElementById('ordercode').value : '';
|
|
|
|
|
|
var wxPayEl = document.getElementById('weixin'),
|
|
|
$aliPayEL = $('#alipay'),
|
|
|
wxHammer = wxPayEl && new Hammer(wxPayEl);
|
|
|
|
|
|
var appIconPosition = {
|
...
|
...
|
@@ -133,6 +133,19 @@ function jsApiCall(orderCode, jsApiParameters) { |
|
|
);
|
|
|
}
|
|
|
|
|
|
// 支付宝支付
|
|
|
if ($aliPayEL && $aliPayEL.length > 0 && $aliPayEL.data('href')) {
|
|
|
$aliPayEL.on('click', function() {
|
|
|
$.get($aliPayEL.data('href'), function(result) {
|
|
|
if (result && result.code === 200 && result.url) {
|
|
|
window.location.href = result.url;
|
|
|
} else {
|
|
|
tip.show(result && result.message || '系统错误!');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 微信支付
|
|
|
function callpay(orderCode) {
|
|
|
var jsApiParameters;
|
...
|
...
|
@@ -195,7 +208,7 @@ function hideAliPay() { |
|
|
|
|
|
$payApps.each(function(idx, app) {
|
|
|
if ($(app).parent().attr('id') === 'alipay') {
|
|
|
$(app).closest('a').css('display', 'none');
|
|
|
$(app).parent().css('display', 'none');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
...
|
...
|
|