설명 없음
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 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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-11-25 -->
  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. <style>
  20. .pay-item{border:1px solid #eee;height: 50px;position: relative;}
  21. .pay-item-select{border:1px solid #1E9FFF;}
  22. .pay-item-select::after{position: absolute;right: 4px;bottom: 0;content: "";width:6px;height: 12px;border-bottom: 2px solid #fff;border-right: 2px solid #fff;-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);transform: rotate(45deg);}
  23. .pay-item.pay-item-select span {position: absolute;right: 0;bottom: 0;width: 0;height: 0;border-bottom: 20px solid #1E9FFF;border-left: 20px solid transparent;}
  24. .button-wrapper{text-align: right;margin-top: 20px;}
  25. .layui-btn{height: 32px;line-height: 32px;border: 1px solid transparent;padding: 0 15px;background-color:#1E9FFF;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;border-radius: 2px;cursor: pointer;}
  26. .main-bg{margin-bottom: 0 !important;padding-bottom: 0 !important; }
  27. </style>
  28. </head>
  29. <body>
  30. <div class="ey-container">
  31. <div class="el-main main-bg">
  32. <div class="el-form-item" style="text-align: center;">
  33. <div class="el-form-item__content pay-type-select">
  34. <!-- 支付API列表,套板请务必将整块代码一起复制,包含隐藏域 -->
  35. <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  36. {eyou:sppayapilist id='vo'}
  37. {eyou:notempty name="$vo.pay_id"}
  38. {neq name="$vo.pay_mark" value="Hupijiaopay"}
  39. {eyou:php}$pay_mark_vars = "users/skin/images/".$vo['pay_mark'].".png";{/eyou:php}
  40. <div class="pay-item" onclick="LayerPaySelect(this);" data-mark="{$vo.pay_mark}" data-parameter="'{$vo.pay_id}','{$vo.pay_mark}'">
  41. <a href="JavaScript:void(0);" >
  42. <!--onclick="SelectPayMethodLayer('{$vo.pay_id}', '{$vo.pay_mark}');"-->
  43. <img src="{eyou:empty name='$vo.pay_img'}{eyou:static file='$pay_mark_vars' /}{eyou:else/}{$vo.pay_img}{/eyou:empty}">
  44. <span></span>
  45. </a>
  46. </div>
  47. {/neq}
  48. {/eyou:notempty}
  49. {$vo.hidden}
  50. {/eyou:sppayapilist}
  51. <input type="hidden" id="PayID">
  52. <input type="hidden" id="PayMark">
  53. <!-- END -->
  54. {eyou:if condition="1 != $data.transaction_type && 1 == $data.pay_balance_open"}
  55. <div class="pay-item" data-toggle="modal" data-target="#pay-order-modal" onclick="LayerPaySelect(this);" data-mark="balance" data-parameter="'{$data.unified_id}','{$data.unified_number}','{$data.transaction_type}'">
  56. <a href="JavaScript:void(0);" id="PayBalancePayment" >
  57. <!--onclick="PayBalancePayment('{$data.unified_id}','{$data.unified_number}','{$data.transaction_type}');"-->
  58. <img src="{eyou:static file='users/skin/images/pay_yiyou.png' /}" >
  59. <span></span>
  60. </a>
  61. <!--<span>拥有余额:¥{$users.users_money}</span>-->
  62. </div>
  63. <script type="text/javascript">
  64. // 余额支付,购买商品+视频支付使用
  65. function PayBalancePayment(unified_id,unified_number,transaction_type) {
  66. if (!unified_number || !unified_id) layer.msg('订单号异常,请刷新重试', {time: 1500});
  67. // 禁止再次点击余额支付
  68. $('#PayBalancePayment').prop("disabled", true).css("pointer-events", "none");
  69. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  70. // 发送请求
  71. layer_loading('订单处理中');
  72. $.ajax({
  73. url: '{$RootDir}/index.php?m=user&c=PayApi&a=balance_payment&_ajax=1',
  74. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
  75. type:'post',
  76. dataType:'json',
  77. success:function(res){
  78. layer.closeAll();
  79. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  80. var _parent = parent;
  81. _parent.layer.close(parentObj);
  82. if (1 == res.code) {
  83. if (!res.data.mobile && !res.data.email) {
  84. _parent.layer.msg(res.msg, {shade: 0.3, time: 1000}, function(){
  85. _parent.window.location.reload();
  86. });
  87. } else {
  88. if (res.data.mobile) SendMobile(res.data.mobile);
  89. if (res.data.email) SendEmail(res.data.email);
  90. _parent.layer.msg(res.msg, {shade: 0.3, time: 1000}, function(){
  91. _parent.window.location.reload();
  92. });
  93. }
  94. } else {
  95. _parent.PayIsRecharge(res.msg, res.url,unified_id,unified_number,transaction_type);
  96. }
  97. }
  98. });
  99. }
  100. </script>
  101. {/eyou:if}
  102. </div>
  103. <div class="button-wrapper"><button type="button" class="layui-btn layui-btn-sm" id="confirm">确认支付{$data.order_amount}元</button></div>
  104. </div>
  105. </div>
  106. </div>
  107. <script type="text/javascript">
  108. $(function(){
  109. // 默认支付方式
  110. $($('.el-form-item__content .pay-item')[0]).trigger("click");
  111. });
  112. function LayerPaySelect(obj) {
  113. $(".pay-item").each(function(){
  114. $(this).removeClass('pay-item-select');
  115. });
  116. $(obj).addClass('pay-item-select');
  117. var mark = $(obj).attr('data-mark')
  118. if (mark){
  119. var parameter = $(obj).attr('data-parameter')
  120. if ('balance' == mark){
  121. $('#confirm').attr("onclick","PayBalancePayment("+parameter+");");
  122. }else{
  123. $('#confirm').attr("onclick","SelectPayMethodLayer("+parameter+");");
  124. }
  125. }
  126. }
  127. // function confirm(e) {
  128. // var mark = $('.pay-item-select').attr('data-mark')
  129. // if (mark){
  130. // var parameter = $('.pay-item-select').attr('data-parameter')
  131. // if ('balance' == mark){
  132. // $(e).attr("onclick","PayBalancePayment("+parameter+");");
  133. // }else{
  134. // $(e).attr("onclick","SelectPayMethodLayer("+parameter+");");
  135. // }
  136. // }
  137. // }
  138. </script>
  139. </body>