Нема описа
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.

article_pay.htm 8.1KB

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