설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pay_account_recharge.htm 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>账户充值-{eyou:global name='web_name' /}</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  10. {eyou:static file="users/skin/css/eyoucms.css" /}
  11. <!-- 新样式 2020-11-25 -->
  12. {eyou:static file="users/skin/css/element/index.css" /}
  13. {eyou:static file="users/skin/css/e-user.css" /}
  14. {eyou:include file="users/skin/css/diy_css.htm" /}
  15. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  16. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  17. {eyou:static file="users/skin/js/global.js"/}
  18. </head>
  19. <body>
  20. {eyou:include file="users/users_header.htm" /}
  21. <div class="breadcrumbs"> </div>
  22. <div class="ey-body-bg">
  23. <div class="ey-body pd0">
  24. <div class="ey-container w1226">
  25. {eyou:include file="users/users_left.htm" /}
  26. <div class="ey-con fr">
  27. <div class="xin_mian user-pay-con main-bg">
  28. <div class="user-pay-box">
  29. <div class="el-row shop-oper">
  30. <h1 class="title">账户充值</h1>
  31. </div>
  32. <form id="postForm" action="{eyou:url link='user/Pay/pay_account_recharge' /}" method="post">
  33. <div class="item-from-row">
  34. <div class="from-row-l">
  35. 账户余额 :
  36. </div>
  37. <div class="from-row-r">
  38. <span class="red">{$users.users_money}</span>元
  39. </div>
  40. </div>
  41. <div class="item-from-row">
  42. <div class="from-row-l">
  43. 充值金额 :
  44. </div>
  45. <div class="from-row-r">
  46. <span><input type="text" class="el-input__inner w100" onkeyup="this.value=this.value.replace(/[^0-9\.]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9\.]/g,'')" name="money" value="{$money}"> 元</span>
  47. </div>
  48. </div>
  49. <div class="item-from-row" id="div_zhifufangshi" style="min-height: 60px;line-height: 60px; display: none;">
  50. <div class="from-row-l">
  51. 支付方式 :
  52. </div>
  53. <div class="from-row-r">
  54. <!-- 支付API列表,套板请务必将整块代码一起复制,包含隐藏域 -->
  55. {eyou:sppayapilist id='vo'}
  56. {eyou:notempty name="$vo.pay_id"}
  57. <div class="pay-type-item {eq name='$key' value='0'} active {/eq}" data-type="zxzf_{$vo.pay_mark}">
  58. <img src="{$vo.pay_img}" alt="{$vo.pay_name}">
  59. <i class="el-icon-check"></i>
  60. </div>
  61. {/eyou:notempty}
  62. {$vo.hidden}
  63. {/eyou:sppayapilist}
  64. <input type="hidden" id="PayID">
  65. <input type="hidden" id="PayMark">
  66. <script type="text/javascript">
  67. $(function(){
  68. if ($('#div_zhifufangshi').find('.pay-type-item').length > 0) $('#div_zhifufangshi').show();
  69. });
  70. </script>
  71. <!-- END -->
  72. </div>
  73. </div>
  74. <div class="el-row mt20 ">
  75. <input type="hidden" name="payment_type" value="zxzf_wechat">
  76. <input type="hidden" name="unified_number" value="{$unified_number}">
  77. <a href="JavaScript:void(0);" id='pay_btn' onclick="pay_money();" class="button2 el-button--primary">
  78. 立即支付
  79. </a>
  80. </div>
  81. </form>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <input type="hidden" id="unified_id">
  88. <input type="hidden" id="unified_number">
  89. <input type="hidden" id="transaction_type">
  90. </div>
  91. <script type="text/javascript">
  92. $(document).keydown(function(event){
  93. if(event.keyCode ==13){
  94. pay_money();
  95. return false;
  96. }
  97. });
  98. $(function(){
  99. $('input[name=money]').focus();
  100. // 默认支付方式
  101. var default_payment_type = $('#div_zhifufangshi .pay-type-item.active').attr('data-type');
  102. $('input[name=payment_type]').val(default_payment_type);
  103. // 支付类型选择
  104. $('#div_zhifufangshi .pay-type-item').click(function(){
  105. $(this).siblings().removeClass('active').end().addClass('active');
  106. $('input[name=payment_type]').val($(this).data('type'));
  107. });
  108. });
  109. function pay_money(){
  110. var money = $('input[name=money]');
  111. if($.trim(money.val()) == ''){
  112. layer.msg('充值金额不能为空!', {icon: 5, time: 1000});
  113. money.focus();
  114. return false;
  115. } else if(isNaN($.trim(money.val()))){
  116. layer.msg('请输入正确的充值金额!', {icon: 5, time: 1000});
  117. money.focus();
  118. return false;
  119. }
  120. if($('input[name=payment_type]').val() == ''){
  121. layer.msg('请选择支付方式!', {icon: 5, time: 1000});
  122. return false;
  123. }
  124. layer_loading('正在处理');
  125. $.ajax({
  126. async: false,
  127. url: "{:url('user/Pay/pay_account_recharge', ['version'=>'v2', '_ajax'=>1])}",
  128. data: $('#postForm').serialize(),
  129. type:'post',
  130. dataType:'json',
  131. success:function(res){
  132. if (res.code == 1) {
  133. if (0 == res.data.is_gourl) {
  134. layer.closeAll();
  135. $('#unified_id').val(res.data.unified_id);
  136. $('#unified_number').val(res.data.unified_number);
  137. $('#transaction_type').val(res.data.transaction_type);
  138. } else {
  139. SelectPayMethod_2(res.data.pay_id, res.data.pay_mark, res.data.unified_id, res.data.unified_number, res.data.transaction_type);
  140. }
  141. } else {
  142. layer.closeAll();
  143. showErrorAlert(res.msg, 0);
  144. }
  145. },
  146. error : function(e) {
  147. layer.closeAll();
  148. showErrorAlert(e.responseText);
  149. }
  150. });
  151. }
  152. </script>
  153. {eyou:include file="users/users_footer.htm" /}