No Description
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.

download_pay.htm 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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/basic.css" /}
  11. {eyou:static file="users/skin/css/eyoucms.css" /}
  12. <!-- 新样式 2020-12-8 -->
  13. {eyou:static file="users/skin/css/element/index.css" /}
  14. {eyou:static file="users/skin/css/e-user.css" /}
  15. {eyou:include file="users/skin/css/diy_css.htm" /}
  16. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  17. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  18. {eyou:static file="users/skin/js/global.js" /}
  19. <script>
  20. !(function (doc, win) {
  21. var docEle = doc.documentElement,
  22. evt = "onorientationchange" in window ? "orientationchange" : "resize",
  23. fn = function () {
  24. var width = docEle.clientWidth;
  25. width && (docEle.style.fontSize = 13 * (width / 320) + "px");
  26. };
  27. win.addEventListener(evt, fn, false);
  28. doc.addEventListener("DOMContentLoaded", fn, false);
  29. }(document, window));
  30. </script>
  31. </head>
  32. <body>
  33. <div class="ey-container buy-vip">
  34. <div class="buy-number mb10">
  35. <p>会员昵称:{$users.nickname}</p>
  36. </div>
  37. <div class="buy-course">
  38. <div class="bc-block">
  39. <img src="{$data.product_litpic}" class="left-pic">
  40. <div class="right-con">
  41. <p class="p1">{$data.cause}</p>
  42. <p class="p2">¥ {$data.order_amount}</p>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="el-row bgfff mt10">
  47. <div class="el-row" id="div_zhifufangshi">
  48. <div class="el-form level-row">
  49. {eyou:sppayapilist id='vo'}
  50. {eyou:notempty name="$vo.pay_id"}
  51. <label class="radio-label pt10 pb10 pl20 pr20 e-label border-b-1-e">
  52. <span class="ariticlePay phpSelectPayRadio" data-id="{$vo.pay_id}" data-mark="{$vo.pay_mark}" onclick="selectPayType(this);">
  53. <span><img class="pay_img" src="{$vo.pay_img}" alt="{$vo.pay_name}">{$vo.pay_name} </span>
  54. <input class="radio" type="radio" name='pay_id' value="{$vo.pay_id}" {eyou:eq name="$key" value="0"} checked {/eyou:eq}>
  55. <span class="check-mark top15 ri20"></span>
  56. </span>
  57. </label>
  58. {/eyou:notempty}
  59. {$vo.hidden}
  60. {/eyou:sppayapilist}
  61. {eyou:eq name="$data.pay_balance_open" value="1"}
  62. <label class="radio-label pt10 pb10 pl20 pr20 e-label border-b-1-e">
  63. <span class="ariticlePay phpSelectPayRadio" data-id="0" data-mark="balance" onclick="selectPayType(this);">
  64. <span><img class="pay_img" src="{eyou:static file='users/skin/images/pay_yiyou.png' /}" alt="余额支付">余额支付 </span>
  65. <input class="radio" type="radio" name='pay_id' value="0">
  66. <span class="check-mark top15 ri20"></span>
  67. </span>
  68. </label>
  69. {/eyou:eq}
  70. <input type="hidden" id="PayID">
  71. <input type="hidden" id="PayMark">
  72. <input type="hidden" id="PayType" value="10">
  73. </div>
  74. </div>
  75. </div>
  76. <div class="buy-price mt10">
  77. <p><strong>应付金额</strong><b>¥{$data.order_amount}</b></p>
  78. </div>
  79. <div class="el-row mt30 btfx">
  80. <input type="hidden" id="unified_id" value="{$data.unified_id}">
  81. <input type="hidden" id="unified_number" value="{$data.unified_number}">
  82. <a href="JavaScript:void(0);" onclick="ariticlePay(this);" class="button2" style="color: #fff!important;"> 立即支付 </a>
  83. </div>
  84. </div>
  85. <script type="text/javascript">
  86. $($('.ariticlePay')[0]).trigger('click');
  87. // 支付方式选择
  88. function selectPayType(obj) {
  89. $('#PayID').val($(obj).data('id'));
  90. $('#PayMark').val($(obj).data('mark'));
  91. }
  92. function ariticlePay(obj) {
  93. // 禁止再次点击余额支付
  94. $(obj).prop("disabled", true).css("pointer-events", "none");
  95. // 提交支付
  96. var pay_id = $('#PayID').val();
  97. var pay_mark = $('#PayMark').val();
  98. var pay_type = $('#PayType').val();
  99. var unified_id = $('#unified_id').val();
  100. var unified_number = $('#unified_number').val();
  101. if (0 === parseInt(pay_id) && 'balance' == pay_mark) {
  102. // 发送请求
  103. layer_loading('订单处理中');
  104. $.ajax({
  105. url: '{$RootDir}/index.php?m=user&c=PayApi&a=balance_payment&_ajax=1',
  106. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: pay_type},
  107. type:'post',
  108. dataType:'json',
  109. success:function(res) {
  110. layer.closeAll();
  111. if (1 == res.code) {
  112. layer.msg(res.msg, {time: 1500}, function() {
  113. window.location.href = res.url;
  114. });
  115. } else {
  116. rechargePay(obj, res.msg, res.url);
  117. }
  118. }
  119. });
  120. } else {
  121. SelectPayMethod_2(pay_id, pay_mark, $('#unified_id').val(), $('#unified_number').val(), $('#PayType').val());
  122. }
  123. }
  124. // 是否要去充值
  125. function rechargePay(obj, msg ,url) {
  126. layer.confirm(msg, {
  127. title: false,
  128. btn: ['去充值','其他方式支付'],
  129. cancel: function(index, layero){
  130. $(obj).prop("disabled", false).css("pointer-events", "");
  131. }
  132. }, function() {
  133. // 去充值
  134. window.open(url);
  135. layer.confirm('是否充值成功,立即支付?', {
  136. title: false,
  137. btn: ['立即支付','其他方式支付'],
  138. cancel: function(index, layero){
  139. $(obj).prop("disabled", false).css("pointer-events", "");
  140. }
  141. }, function() {
  142. // 立即支付
  143. ariticlePay(obj);
  144. }, function(index) {
  145. // 选择其他方式支付时,恢复禁用的余额支付按钮
  146. $(obj).prop("disabled", false).css("pointer-events", "");
  147. layer.closeAll(index);
  148. });
  149. }, function(index) {
  150. // 选择其他方式支付时,恢复禁用的余额支付按钮
  151. $(obj).prop("disabled", false).css("pointer-events", "");
  152. layer.closeAll(index);
  153. });
  154. }
  155. </script>
  156. </body>
  157. </html>