苹果CMS积分提现表单示例
文件目录 html/user/cash.html
数据列表(数组) $list使用volist进行遍历
苹果CMS积分提表单现示例
<form id="fm" name="fm" method="post" action="" > <p>1元等于{$GLOBALS['config']['user']['cash_ratio']}积分,最低提现金额:{$GLOBALS['config']['user']['cash_min']}元</p> <p>剩余{$GLOBALS['user']['user_points']}积分,相当于{$GLOBALS['user']['user_points']/$GLOBALS['config']['user']['cash_ratio']}元;冻结{$GLOBALS['user']['user_points_froze']}积分,相当于{$GLOBALS['user']['user_points_froze']/$GLOBALS['config']['user']['cash_ratio']}元;</p> 银行名称:<input type="text" name="cash_bank_name" placeholder="请输入开户行名称或支付宝微信" value=""> 银行账号:<input type="text" name="cash_bank_no" placeholder="请输入银行卡号或支付宝微信账号" value=""> 收款姓名:<input type="text" name="cash_payee_name" placeholder="请输入收款人姓名与上方账户对应" value="">提现金额:<input type="text" name="cash_money" placeholder="请输入提现金额" value=""> <input type="button" id="btn_submit" value="提交" style="margin: 5px;"></form><script>$("#btn_submit").click(function() { var cash_bank_name = $('input[name="cash_bank_name"]').val(); if(cash_bank_name==''){ alert('请输入银行名称'); return; } var cash_bank_no = $('input[name="cash_bank_no"]').val(); if(cash_bank_no==''){ alert('请输入银行账户'); return; } var cash_payee_name = $('input[name="cash_payee_name"]').val(); if(cash_payee_name==''){ alert('请输入收款人姓名'); return; } var cash_money = $('input[name="cash_money"]').val(); if(cash_money==''){ alert('请输入提现金额'); return; } var data = $("#fm").serialize(); $.ajax({ url: "{:url('user/cash')}", type: "post", dataType: "json", data: data, beforeSend: function () { //开启loading //$(".loading_box").css("display","block"); $("#btn_submit").css("background","#fd6a6a").val("loading..."); }, success: function (r) { alert(r.msg); if(r.code==1){ location.href="{:url('user/cash')}" rel="external nofollow" ; } }, complete: function () { //结束loading //$(".loading_box").css("display","none"); $("#btn_submit").css("background","#fa4646").val("提交"); } });});</script>
Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard. Commenter avatars come from Gravatar.