@ -179,7 +179,7 @@
< / if >
< / if >
< if condition = "$pay_price elt C('WX_PAY_LIMIT')" >
< if condition = "$pay_price elt C('WX_PAY_LIMIT')" >
< if condition = "C('wei_xin.status') eq 1 or C('weixin_gf.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.wx') eq 1) or (C('heepay.status') eq 1 and C('heepay.wxp') eq 1) or (C('sqpay.status') eq 1 and C('sqpay.wx_small') eq 1)" >
< if condition = "C('wei_xin.status') eq 1 or C('weixin_gf.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.wx') eq 1) or (C('heepay.status') eq 1 and C('heepay.wxp') eq 1) or (C('sqpay.status') eq 1 and C('sqpay.wx_small') eq 1)" >
< a class= "weui-cell" onclick = "return small_program({:C('sqpay.wx_small')});" href = "{:U('PayH5/weixin_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id'),'user_token'=>I('user_token')))}" class = "recharge_way_btn recharge_way_btn_wechat" >
< a id= "wxpay" class = "weui-cell" data-url = "{:U('PayH5/weixin_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id'),'user_token'=>I('user_token')))}" class = "recharge_way_btn recharge_way_btn_wechat" >
< div class = "weui-cell__hd" > < img src = "__IMG__/wxpay.png" > < / div >
< div class = "weui-cell__hd" > < img src = "__IMG__/wxpay.png" > < / div >
< div class = "weui-cell__bd" >
< div class = "weui-cell__bd" >
< p style = "color: #292929;font-size:.28rem;" > 微信支付< / p >
< p style = "color: #292929;font-size:.28rem;" > 微信支付< / p >
@ -219,7 +219,7 @@
function small_program(status) {
function small_program(status) {
//alert(status);
//alert(status);
if (status == 1) { // 小程序
if (status == " 1" ) { // 小程序
if ($('#sdk_version').val() == 1) { // android
if ($('#sdk_version').val() == 1) { // android
window.txyxsdk.getSmallRoutine($('#small_json').val());
window.txyxsdk.getSmallRoutine($('#small_json').val());
} else {
} else {
@ -228,11 +228,23 @@ function small_program(status) {
return false;
return false;
}
}
$(this).removeAttr("onclick", "");
return true;
return true;
}
}
$(function() {
$(function() {
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');
}
});
if ($("#pay_price").data("pay_price") == 0) {
if ($("#pay_price").data("pay_price") == 0) {
$("#platform_pay").show();
$("#platform_pay").show();
$(".paylist").hide();
$(".paylist").hide();
@ -246,6 +258,9 @@ $(function() {
});
});
$('#alipaybtn').on('click',function() {
$('#alipaybtn').on('click',function() {
if (flag) return ;
flag = true;
var that = $(this),url = $.trim(that.attr('data-url'));
var that = $(this),url = $.trim(that.attr('data-url'));
if(that.hasClass('disabledbtn')){return false;}
if(that.hasClass('disabledbtn')){return false;}
that.addClass('disabled');
that.addClass('disabled');