From 8f0ae7dd8bdf5b97ae8b764a17ecd24c59a8be79 Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 11 Nov 2019 19:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E7=95=8C=E9=9D=A2=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=B5=8C=E5=A5=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/View/User/recharge.html | 158 +++++++++++++++------ 1 file changed, 118 insertions(+), 40 deletions(-) diff --git a/Application/Mobile/View/User/recharge.html b/Application/Mobile/View/User/recharge.html index 0a21fa3e7..50a470c4a 100644 --- a/Application/Mobile/View/User/recharge.html +++ b/Application/Mobile/View/User/recharge.html @@ -16,108 +16,164 @@
充值中心 - +
  • 平台币充值
  • 折扣充值
  • +
    +
    +
    充值账户
    + {:session('suser_auth.account')}
    充值金额
    - +
    获得平台币
    - +
    +
    +
    请选择支付方式
    +
    +
    + +
    +
    支付宝支付
    +
    推荐支付宝用户使用
    +
    +
    + +
    + + +
    + +
    +
    +
    + +
    +
    微信支付
    +
    推荐微信用户使用
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + 确认支付
    +
    +
    -
    -
    -
    请选择支付方式
    -
    -
    - -
    -
    支付宝支付
    -
    推荐支付宝用户使用
    +
    +
    +
    请选择支付方式
    +
    +
    + +
    +
    支付宝支付
    +
    推荐支付宝用户使用
    +
    +
    -
    - - -
    +
    + + +
    -
    -
    -
    - -
    -
    微信支付
    -
    推荐微信用户使用
    +
    +
    +
    + +
    +
    微信支付
    +
    推荐微信用户使用
    +
    +
    +
    + + +
    +
    -
    -
    - - -
    +
    + +
    + 确认支付
    +
    +
    -
    立即充值
    + + + +
    @@ -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",