重复点击支付

master
tpingzhang 5 years ago
parent 3afd358384
commit 64aba79409

@ -234,10 +234,10 @@ function small_program(status) {
}
$(function() {
$("#wxpay").one('click', function() {
$(this).removeAttr("one", "");
$("#alipaybtn").removeAttr("one", "");
var flag = false;
$("#wxpay").on('click', function() {
if (flag) return ;
flag = true;
$r = small_program("{:C('sqpay.wx_small')}");
if ($r) {
window.location.href = $(this).data('url');
@ -257,9 +257,9 @@ $(function() {
window.location.href = url;
});
$('#alipaybtn').one('click',function() {
$(this).removeAttr("one", "");
$("#wxpay").removeAttr("one", "");
$('#alipaybtn').on('click',function() {
if (flag) return ;
flag = true;
var that = $(this),url = $.trim(that.attr('data-url'));
if(that.hasClass('disabledbtn')){return false;}

@ -60,16 +60,16 @@
<script>
$(function(){
$("#wxpay").one('click', function() {
$(this).removeAttr("one", "");
$("#alipaybtn").removeAttr("one", "");
var flag = false;
$("#wxpay").on('click', function() {
if (flag) return ;
flag = true;
window.location.href = $(this).data('url');
});
$('#alipaybtn').one('click',function() {
$(this).removeAttr("one", "");
$("#wxpay").removeAttr("one", "");
$('#alipaybtn').on('click',function() {
if (flag) return ;
flag = true;
var that = $(this),url = $.trim(that.attr('data-url'));
if(that.hasClass('disabledbtn')){return false;}
@ -92,10 +92,14 @@ $(function(){
else {
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
if (isAndroid)
if (isAndroid) {
window.txyxsdk.getZFBPay(data.url);
else
} else {
try {
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
} catch(err) {
}
}
}
} else {
layer.open({

Loading…
Cancel
Save