|
|
|
@ -16,74 +16,119 @@
|
|
|
|
|
<div class="recharge-heard">
|
|
|
|
|
<!-- 子页公共头部 -->
|
|
|
|
|
<div class="subpage-heard">充值中心
|
|
|
|
|
<a href="#" class="arrows"></a>
|
|
|
|
|
<a href="{:U('/User/index')}" class="arrows"></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="recharge-tabbar">
|
|
|
|
|
<li class="selected" name="currency">平台币充值</li>
|
|
|
|
|
<li name="iscurrency">折扣充值</li>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
|
|
<div class="recharge-flat" >
|
|
|
|
|
<form class="" id="form1" 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="请输入充值账户">
|
|
|
|
|
<span>{:session('suser_auth.account')}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>充值金额</div>
|
|
|
|
|
<input type="text" class="rcmoney" name="pay_amount" placeholder="请输入金额,最低金额1元">
|
|
|
|
|
<input type="text" class="rcmoney1" name="pay_amount" placeholder="请输入金额,最低金额1元" style="text-align:right;width: 2.88rem">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>获得平台币</div>
|
|
|
|
|
<input type="text" class="rcplatform" name="balance" readonly placeholder="" value="">
|
|
|
|
|
<input type="text" class="rcplatform" name="balance" readonly placeholder="" value="" style="text-align:right;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="recharge-payment">
|
|
|
|
|
<div class="title">请选择支付方式</div>
|
|
|
|
|
<div class="alipay">
|
|
|
|
|
<div class="alipay_img">
|
|
|
|
|
<img src="__IMG__/zhifubaozhifu.png" alt="">
|
|
|
|
|
<div class="img_text">
|
|
|
|
|
<div>支付宝支付</div>
|
|
|
|
|
<div>推荐支付宝用户使用</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="radio_select">
|
|
|
|
|
<input id="zhifubao" name="way" type="radio" value="1" checked>
|
|
|
|
|
<label for="zhifubao" class="radio-label"></label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="alipay" id="ch_weixin">
|
|
|
|
|
<div class="alipay_img">
|
|
|
|
|
<img src="__IMG__/weixin.png" alt="">
|
|
|
|
|
<div class="img_text">
|
|
|
|
|
<div>微信支付</div>
|
|
|
|
|
<div>推荐微信用户使用</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="radio_select">
|
|
|
|
|
<input id="weixin" name="way" type="radio" value="2" >
|
|
|
|
|
<label for="weixin" class="radio-label"></label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="text-align: center;">
|
|
|
|
|
<input type="hidden" name="spendType" value="1">
|
|
|
|
|
<div class="payment_btn" style="margin-left: 1rem;">
|
|
|
|
|
确认支付</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<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="请输入充值账户">
|
|
|
|
|
<span>{:session('suser_auth.account')}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>选择游戏</div>
|
|
|
|
|
<select name="" id="game_id">
|
|
|
|
|
<select name="game_id" id="game_id">
|
|
|
|
|
<option value="">请选择游戏</option>
|
|
|
|
|
<option value="">落梦星辰</option>
|
|
|
|
|
<volist name="gameList" id="vo">
|
|
|
|
|
<option value="{$vo.id}" data-radio="{$vo.bind_recharge_discount}">{$vo.game_name}</option>
|
|
|
|
|
</volist>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>充值金额</div>
|
|
|
|
|
<input type="text" placeholder="请输入金额,最低金额1元">
|
|
|
|
|
<input type="text" class="txt rcmoney" id="pay_amount" name="pay_amount" placeholder="请输入金额,最低金额1元" style="width:2.88rem;text-align:right;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>折扣比例</div>
|
|
|
|
|
<span></span>
|
|
|
|
|
<input type="text" class="txt discount" value="" readonly style="color: #FE9C22;text-align:right;">
|
|
|
|
|
|
|
|
|
|
<input class="rcratio" name="ratio" type="hidden" value="" style="text-align:right;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>实付金额</div>
|
|
|
|
|
<span></span>
|
|
|
|
|
<input type="text" class="txt realmoney" name="realmoney" readonly style="text-align:right;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flat-box">
|
|
|
|
|
<div class="flat-info">
|
|
|
|
|
<div>获得绑币</div>
|
|
|
|
|
<span></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="text" class="txt rcplatform" name="rcplatform" readonly style="text-align:right;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="recharge-payment">
|
|
|
|
@ -98,12 +143,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="radio_select">
|
|
|
|
|
<input id="zhifubao" name="radio" type="radio" value="支付宝" checked>
|
|
|
|
|
<label for="zhifubao" class="radio-label"></label>
|
|
|
|
|
<input id="zhifubao1" name="way" type="radio" value="1" checked>
|
|
|
|
|
<label for="zhifubao1" class="radio-label"></label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="alipay" id="ch_weixin">
|
|
|
|
|
<div class="alipay" id="ch_weixin1">
|
|
|
|
|
<div class="alipay_img">
|
|
|
|
|
<img src="__IMG__/weixin.png" alt="">
|
|
|
|
|
<div class="img_text">
|
|
|
|
@ -112,12 +157,23 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="radio_select">
|
|
|
|
|
<input id="weixin" name="radio" type="radio" value="微信" >
|
|
|
|
|
<label for="weixin" class="radio-label"></label>
|
|
|
|
|
<input id="weixin1" name="way" type="radio" value="2" >
|
|
|
|
|
<label for="weixin1" class="radio-label"></label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="text-align: center;">
|
|
|
|
|
<input type="hidden" name="spendType" value="1">
|
|
|
|
|
<div class="payment_btn" style="margin-left: 1rem;">
|
|
|
|
|
确认支付</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="payment_btn">立即充值</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!--<div class="popmsg pop-dialog"></div>-->
|
|
|
|
|
</body>
|
|
|
|
@ -153,7 +209,7 @@
|
|
|
|
|
$('#game_id').change(function() {
|
|
|
|
|
var that = $(this),cur = that.find('option:selected');
|
|
|
|
|
var ratio = cur.attr('data-radio');
|
|
|
|
|
var parent = that.closest('.jsinfo');
|
|
|
|
|
var parent = that.closest('.recharge-discount');
|
|
|
|
|
var rr = parent.find('.rcratio');
|
|
|
|
|
var sib = rr.siblings('input');
|
|
|
|
|
var rm = parent.find('.realmoney');
|
|
|
|
@ -173,7 +229,28 @@
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$('.rcmoney').keyup(function() {
|
|
|
|
|
var that = $(this),val = $.trim(that.val()),parent=that.closest('.jsinfo'),pf=parent.find('.rcplatform');
|
|
|
|
|
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) {
|
|
|
|
|
if (val>0 && /^(0|[1-9][0-9]*)$/.test(val)) {
|
|
|
|
|
pf.val(val);
|
|
|
|
|
if (rm) {
|
|
|
|
|
var ratio = $.trim(parent.find('.rcratio').val()) || 10;
|
|
|
|
|
var rmnum = Math.floor(ratio*100 * val/10)/100;
|
|
|
|
|
rm.val(rmnum);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
popmsg.msg('请输入非零开头的正整数');that.val('').focus();
|
|
|
|
|
pf.val('');if(rm) {rm.val('');}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
popmsg.msg('请输入充值金额');that.val('').focus();
|
|
|
|
|
pf.val('');if(rm) {rm.val('');}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$('.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) {
|
|
|
|
@ -263,6 +340,7 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if(validation(form)){
|
|
|
|
|
console.log(form.serialize())
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:form.attr('active'),
|
|
|
|
|
type:"post",
|
|
|
|
|