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.

pay_recharge_detail.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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. {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. {eyou:static file="/public/static/common/js/mobile_global.js"/}
  19. </head>
  20. <body>
  21. <div class="ey-header-status">
  22. <div class="header-status-l">
  23. <a href="javascript:history.go(-1)"><i class="el-icon-arrow-left"></i></a>
  24. </div>
  25. <div class="header-status-m">订单支付</div>
  26. <div class="header-status-r">
  27. <a href="{eyou:url link='user/Users/index' /}"><i class="el-icon-user"></i></a>
  28. </div>
  29. </div>
  30. <div class="h50"></div>
  31. <div class="ey-container">
  32. <div class="el-row p10 bgfff">
  33. <div class="order-row tc ">
  34. <i class="el-icon-success"></i>
  35. </div>
  36. <div class="order-row tc">
  37. <span class="info">订单提交成功!去付款咯~</span>
  38. </div>
  39. <div class="order-row">
  40. 订单号:
  41. <span class="red">{$data.unified_number}</span>
  42. </div>
  43. <div class="order-row">
  44. 商品名称:
  45. <span class="red">
  46. {eq name='$data.transaction_type' value='2'}
  47. {volist name='$data.order_details' id='goods'}
  48. <span>
  49. {$goods.product_name}&nbsp;
  50. {volist name='$goods.product_spec_list' id='spec'}{$spec.value}&nbsp;{/volist}
  51. </span>
  52. {/volist}
  53. {else /}
  54. <span class="red">{$data.cause}</span>
  55. {/eq}
  56. </span>
  57. </div>
  58. <div class="order-row">
  59. {eyou:if condition="!empty($data.points_shop_order)"}
  60. 应付总额:<span class="red">{$data.order_amount}</span>
  61. {eyou:else/}
  62. 应付总额:<span class="red">¥{$data.unified_amount}元</span>
  63. {/eyou:if}
  64. {eyou:eq name="$data.transaction_type" value="1"}
  65. <a href="{:url('user/Pay/pay_account_recharge', ['unified_number'=>$data['unified_number'],'money'=>$data['unified_amount']])}">(更改)</a>
  66. {/eyou:eq}
  67. </div>
  68. <div class="order-row">
  69. {eyou:if condition="!empty($data.eyCountdownTimes) && !empty($data.paymentExpire)"}
  70. <p class="order-time">
  71. <span>请在<span id="{$data.eyCountdownTimes}" style="color: red;"></span><span>内完成支付, 超时后将取消订单</span></span>
  72. </p>
  73. {/eyou:if}
  74. </div>
  75. </div>
  76. <div class="el-row p10 bgfff mt10">
  77. <div class="column-title">
  78. <div class="column-name">{eyou:eq name="$data.use_pay_type" value="0"}未开启支付方式{eyou:else/}支付方式{/eyou:eq}</div>
  79. </div>
  80. {$data.PayTypeHidden}
  81. <div class="pay-type">
  82. <div class="li_div">
  83. <div class="pay-con pt10 pb10">
  84. {$data.payTypeHidden}
  85. {eyou:sppayapilist id='vo'}
  86. {eyou:notempty name="$vo.pay_id"}
  87. <label class="radio-label pt10 pb10 pl0 e-label mb0 radio-label-flex phpSelectPayRadio" data-type="zxzf_{$vo.pay_mark}" data-id="{$vo.pay_id}" data-mark="{$vo.pay_mark}" onclick="selectPayType(this);">
  88. <span><img class="pay_img" src="{$vo.pay_img}" alt="{$vo.pay_name}">{$vo.pay_name}</span>
  89. <input class="radio" type="radio" name='pay_id' value="{$vo.pay_id}" {eyou:eq name="$key" value="0"} checked {/eyou:eq}>
  90. <span class="check-mark ri0"></span>
  91. </label>
  92. {/eyou:notempty}
  93. {$vo.hidden}
  94. {/eyou:sppayapilist}
  95. <input type="hidden" id="PayID">
  96. <input type="hidden" id="PayMark">
  97. {eyou:if condition="empty($data.shop_open_offline) && empty($data.PromType) && empty($data.onlyVerify) && 2 == $data.transaction_type"}
  98. <label class="radio-label pt10 pb10 pl0 mb0 e-label radio-label-flex phpSelectPayRadio" data-type="hdfk_payOnDelivery" data-id="0" data-mark="payOnDelivery" onclick="selectPayType(this);">
  99. <span><img class="pay_img" src="{eyou:static file='users/skin/images/hdfk.png' /}" alt="货到付款">货到付款 </span>
  100. <input class="radio" type="radio" name='pay_id' value="0">
  101. <span class="check-mark ri0"></span>
  102. </label>
  103. {/eyou:if}
  104. {eyou:if condition="1 != $data.transaction_type && 1 == $data.pay_balance_open"}
  105. <label class="radio-label pt10 pb10 pl0 mb0 e-label radio-label-flex phpSelectPayRadio" data-type="yezf_balance" data-id="0" data-mark="balance" onclick="selectPayType(this);">
  106. <span><img class="pay_img" src="{eyou:static file='users/skin/images/pay_yiyou.png' /}" alt="余额支付">余额支付 <span class="fc9 f14">可用{$users.users_money} 元</span></span>
  107. <input class="radio" type="radio" name='pay_id' value="0">
  108. <span class="check-mark ri0"></span>
  109. </label>
  110. {/eyou:if}
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <div class="el-row p10 bgfff mt10">
  116. <div class="handle-action">
  117. <div class="operating-button">
  118. <a href="javascript:void(0);" class="btn btn-primary" onclick="submitSelectPay(this);">去结算</a>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <script type="text/javascript">
  124. // 倒计时
  125. var paymentExpire = "{$data.paymentExpire}";
  126. var eyCountdownTimes = "{$data.eyCountdownTimes}";
  127. if (paymentExpire > 0) {
  128. executeCountdownTimes(paymentExpire);
  129. }
  130. function executeCountdownTimes(ey_totalSeconds) {
  131. // 取模(余数)
  132. var modulo = parseInt(ey_totalSeconds) % (60 * 60 * 24);
  133. // 小时数
  134. var hours = Math.floor(modulo / (60 * 60));
  135. modulo = modulo % (60 * 60);
  136. // 分钟
  137. var minutes = Math.floor(modulo / 60);
  138. // 秒数
  139. var seconds = parseInt(ey_totalSeconds % 60, 10);
  140. // 输出到页面
  141. $('#' + eyCountdownTimes).html(hours + "小时" + minutes + "分" + seconds + "秒");
  142. // 剩余秒数
  143. ey_totalSeconds--;
  144. // 倒计时结束则刷新页面
  145. if (parseInt(ey_totalSeconds) <= -1) {
  146. window.location.reload();
  147. } else {
  148. // 延迟一秒执行自己
  149. setTimeout(function () {
  150. executeCountdownTimes(ey_totalSeconds);
  151. }, 1000);
  152. }
  153. }
  154. function submitSelectPay(obj) {
  155. // 禁止再次点击提交
  156. $(obj).prop("disabled", true).css("pointer-events", "none");
  157. // 支付参数
  158. var pay_id = $('#PayID').val();
  159. var pay_mark = $('#PayMark').val();
  160. // 微信支付、支付宝支付、第三方支付
  161. if (parseInt(pay_id) > 0 && pay_mark) SelectPayMethod(pay_id, pay_mark);
  162. // 余额支付、货到付款
  163. if (parseInt(pay_id) === 0 && pay_mark) {
  164. // 余额支付
  165. if ('balance' == pay_mark) {
  166. if (!unified_id || !unified_number || !transaction_type) layer.msg('订单支付参数缺失,刷新重试', {time: 1500});
  167. showLayerLoad();
  168. $.ajax({
  169. type: 'post',
  170. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
  171. url : '{$RootDir}/index.php?m=user&c=PayApi&a=balance_payment&_ajax=1',
  172. dataType: 'json',
  173. success: function(res) {
  174. layer.closeAll();
  175. if (1 === parseInt(res.code)) {
  176. if (res.data.email) eyUnifiedSendRemind(res.data.email);
  177. if (res.data.mobile) eyUnifiedSendRemind(res.data.mobile);
  178. showLayerMsg(res.msg, 2, function() {
  179. window.location.href = res.url;
  180. });
  181. } else {
  182. payIsRecharge(obj, res.msg, res.url);
  183. }
  184. },
  185. error: function (e) {
  186. layer.closeAll();
  187. showLayerAlert(e.responseText);
  188. }
  189. });
  190. }
  191. // 货到付款
  192. else if ('payOnDelivery' == pay_mark) {
  193. if (!unified_id || !unified_number || !transaction_type) layer.msg('订单支付参数缺失,刷新重试', {time: 1500});
  194. showLayerLoad();
  195. $.ajax({
  196. type: 'post',
  197. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
  198. url : '{$RootDir}/index.php?m=user&c=PayApi&a=payOnDelivery&_ajax=1',
  199. dataType: 'json',
  200. success: function(res) {
  201. layer.closeAll();
  202. if (1 === parseInt(res.code)) {
  203. if (res.data.email) eyUnifiedSendRemind(res.data.email);
  204. if (res.data.mobile) eyUnifiedSendRemind(res.data.mobile);
  205. showLayerMsg(res.msg, 2, function() {
  206. window.location.href = res.url;
  207. });
  208. } else {
  209. showLayerAlert(res.msg);
  210. }
  211. },
  212. error: function (e) {
  213. layer.closeAll();
  214. showLayerAlert(e.responseText);
  215. }
  216. });
  217. }
  218. }
  219. // 解除再次点击提交
  220. $(obj).prop("disabled", false).css("pointer-events", "");
  221. }
  222. // 是否要去充值
  223. function payIsRecharge(obj, msg ,url) {
  224. showConfirmBox(msg, ['去充值', '其他方式支付'], function() {
  225. // 去充值
  226. window.open(url);
  227. showConfirmBox('是否充值成功,立即支付?', ['立即支付', '其他方式支付'], function() {
  228. // 立即支付
  229. submitSelectPay(obj);
  230. }, function(index) {
  231. $(obj).prop("disabled", false).css("pointer-events", "");
  232. layer.closeAll(index);
  233. });
  234. }, function(index) {
  235. $(obj).prop("disabled", false).css("pointer-events", "");
  236. layer.closeAll(index);
  237. });
  238. }
  239. </script>
  240. </body>
  241. </html>