diff --git a/src/main/webapp/WEB-INF/pages/check.html b/src/main/webapp/WEB-INF/pages/check.html index ce26ea4..5dc3c38 100644 --- a/src/main/webapp/WEB-INF/pages/check.html +++ b/src/main/webapp/WEB-INF/pages/check.html @@ -214,6 +214,8 @@ if (res.err_msg == "get_brand_wcpay_request:ok") { //$.alert("亲!支付成功!"); //支付成功 + + passHandrail(); window.location.href = mUrl.paySuccessView + '&payMoney=' + totleMoney; } else { @@ -240,6 +242,26 @@ jsApiCall(payParam); } } + + + //支付成功后,调用此函数通知抬杆 + function passHandrail() { + var orderId = $('#parkOrderId').val(); + var req = { + orderId: orderId + } + + $.ajax({ + url: mUrl.passHandrail, + type: 'post', + dataType: 'json', + data: req, + success: function (res) { + console.log(res); + } + }) + + } diff --git a/src/main/webapp/WEB-INF/pages/pay.html b/src/main/webapp/WEB-INF/pages/pay.html index c45d863..bfdc55f 100644 --- a/src/main/webapp/WEB-INF/pages/pay.html +++ b/src/main/webapp/WEB-INF/pages/pay.html @@ -224,7 +224,6 @@ //$.alert("亲!支付成功!"); //支付成功 //调用后台,通知抬杆放行 - passHandrail(); window.location.href = mUrl.paySuccessView + '&payMoney=' + totleMoney; } else { @@ -242,24 +241,7 @@ ); } - //支付成功后,调用此函数通知抬杆 - function passHandrail() { - var orderId = $('#parkOrderId').val(); - var req = { - orderId: orderId - } - - $.ajax({ - url: mUrl.passHandrail, - type: 'post', - dataType: 'json', - data: req, - success: function (res) { - console.log(res); - } - }) - } function callpay(payParam) {