优化官网支付

master
chenzhi 5 years ago
parent c91bab8bed
commit 15ce00396f

@ -19,14 +19,14 @@
<a href="{:U('/User/index')}" class="arrows"></a>
</div>
<div class="recharge-tabbar">
<li class="selected" name="currency">平台币充值</li>
<li name="iscurrency">折扣充值</li>
<li class="selected" name="currency" style="margin-left:0;">平台币充值</li>
<!-- <li name="iscurrency">折扣充值</li> -->
</div>
</div>
<div class="content">
<div class="recharge-flat" >
<div class="recharge-flat" style="width: 6.9rem;height: 2.9rem;">
<form class="" id="form1" action="{:U('User/recharge')}" method="post">
<div class="flat-box">
<div class="flat-info">
@ -38,13 +38,13 @@
<div class="flat-box">
<div class="flat-info">
<div>充值金额</div>
<input type="text" class="rcmoney1" name="pay_amount" placeholder="请输入金额最低金额1元" style="text-align:right;width: 2.88rem">
<input type="text" class="rcmoney1" name="pay_amount" placeholder="请输入金额最低金额1元" style="text-align:right;width: 2.88rem" oninput="this.value=this.value.replace(/[^0-9]+|^0|\d{9}/,'');">
</div>
</div>
<div class="flat-box">
<div class="flat-info">
<div>获得平台币</div>
<input type="text" class="rcplatform" name="balance" readonly placeholder="" value="" style="text-align:right;">
<input type="text" class="rcplatform rcmoney1ptb" name="balance" readonly placeholder="" value="" style="text-align:right;">
</div>
</div>
<div class="recharge-payment">
@ -85,12 +85,12 @@
</div>
</form>
</div>
<div class="recharge-discount" style="display: none;">
<!-- <div class="recharge-discount" style="display: none;">
<form class="" id="form2" action="{:U('User/recharge')}" method="post">
<div class="flat-box">
<div class="flat-info">
<div>充值账户</div>
<input type="hidden" class="txt" name="account" value="{:session('suser_auth.account')}" readonly="readonly" placeholder="请输入充值账户">
<input type="hidden" class="txt" name="account" value="{:session('suser_auth.account')}" readonly="readonly" placeholder="请输入充值账户" >
<span>{:session('suser_auth.account')}</span>
</div>
</div>
@ -108,7 +108,7 @@
<div class="flat-box">
<div class="flat-info">
<div>充值金额</div>
<input type="text" class="txt rcmoney" id="pay_amount" name="pay_amount" placeholder="请输入金额最低金额1元" style="width:2.88rem;text-align:right;">
<input type="text" class="txt rcmoney" id="pay_amount" name="pay_amount" placeholder="请输入金额最低金额1元" style="width:2.88rem;text-align:right;" oninput="this.value=this.value.replace(/[^0-9]+|^0|\d{9}/,'');">
</div>
</div>
<div class="flat-box">
@ -122,7 +122,7 @@
<div class="flat-box">
<div class="flat-info">
<div>实付金额</div>
<input type="text" class="txt realmoney" name="realmoney" readonly style="text-align:right;">
<input type="text" class="txt rcmoney2bb realmoney" name="realmoney" readonly style="text-align:right;">
</div>
</div>
<div class="flat-box">
@ -133,7 +133,7 @@
</div>
<div class="recharge-payment">
<div class="title">请选择支付方式</div>
<div class="alipay">
<div class="alipay bindway">
<div class="alipay_img">
<img src="__IMG__/zhifubaozhifu.png" alt="">
<div class="img_text">
@ -143,12 +143,12 @@
</div>
<div class="radio_select">
<input id="zhifubao1" name="way" type="radio" value="1" checked>
<input id="zhifubao1" name="way1" type="radio" value="1" checked>
<label for="zhifubao1" class="radio-label"></label>
</div>
</div>
<div class="alipay" id="ch_weixin1">
<div class="alipay bindway" id="ch_weixin1">
<div class="alipay_img">
<img src="__IMG__/weixin.png" alt="">
<div class="img_text">
@ -157,7 +157,7 @@
</div>
</div>
<div class="radio_select">
<input id="weixin1" name="way" type="radio" value="2" >
<input id="weixin1" name="way1" type="radio" value="2" >
<label for="weixin1" class="radio-label"></label>
</div>
</div>
@ -169,7 +169,7 @@
</div>
</form>
</div>
</div>
</div> -->
@ -197,6 +197,14 @@
sib.find('.t-tabpan').eq(index).addClass('active').siblings().removeClass('active');
return false;
});
//点击父标签切换radio
$(".alipay").click(function(){
$(this).children(".radio_select").children("input").prop("checked", true);
})
//阻止事件冒泡
$(".radio_select").click(function(){
event.stopPropagation();
})
$('.jssbtn').click(function() {
var that = $(this);
if (that.hasClass('on')) {
@ -237,7 +245,7 @@
$('.rcmoney').keyup(function() {
var that = $(this),val = $.trim(that.val()),parent=that.closest('.recharge-discount'),pf=parent.find('.rcplatform');
var rm = parent.find('.realmoney');
if(val == ""){return true;}
if(val == ""){$(".rcmoney2bb").val(0);$(".rcplatform").val(0);return true;}
if (val) {
if (val>0 && /^(0|[1-9][0-9]*)$/.test(val)) {
pf.val(val);
@ -255,10 +263,10 @@
pf.val('');if(rm) {rm.val('');}
}
});
$('.rcmoney1').keyup(function() {
$('.rcmoney1').keyup(function() {
var that = $(this),val = $.trim(that.val()),parent=that.closest('.recharge-flat'),pf=parent.find('.rcplatform');
var rm = parent.find('.realmoney');
if(val == ""){return true;}
if(val == ""){$(".rcmoney1ptb").val(0);return true;}
if (val) {
if (val>0 && /^(0|[1-9][0-9]*)$/.test(val)) {
pf.val(val);
@ -360,7 +368,8 @@
popmsg.msg(result.info);
}
},
error:function(){
error:function(res){
console.log(res)
alert("服务端异常");
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Loading…
Cancel
Save