Brak opisu
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 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>支付订单</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/pay.css" /}
  11. {eyou:static file="users/skin/css/element/index.css" /}
  12. {eyou:static file="users/skin/css/e-user.css" /}
  13. {eyou:include file="users/skin/css/diy_css.htm" /}
  14. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  15. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  16. {eyou:static file="/public/static/common/js/tag_global.js" /}
  17. <style>
  18. #yezf_balance_tips {
  19. position: absolute;
  20. bottom: 0;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div class="ey-cart-header">
  26. <div class="ey-cart-header-con">
  27. <div class="ey-logo">
  28. <!-- <a href="{eyou:global name='web_cmsurl' /}"><img src="{eyou:global name='web_logo'/}" /></a> -->
  29. </div>
  30. <div class="ey-cart-title">
  31. <h2> 支付订单 </h2>
  32. </div>
  33. <div class="ey-cart-header-r">
  34. {egt name='$php_servicemeal' value='1'}
  35. <div class="right-item user-news">
  36. <a href="{:url('user/UsersNotice/index')}">
  37. {gt name="$unread_num" value="0"}
  38. <span class="num" id="users_unread_num">{$unread_num}</span>
  39. {/gt}
  40. <span class="icon"><i class="el-icon-bell"></i></span>
  41. </a>
  42. </div>
  43. {/egt}
  44. <div class="right-item user-photo">
  45. <a href="{eyou:Diyurl link='user/Users/index' /}"><img src="{$users.head_pic|get_head_pic=###}"/></a>
  46. <div class="user-drop">
  47. <ul>
  48. <li><a href="{eyou:Diyurl link='user/Users/index' /}">个人中心</a></li>
  49. {eyou:if condition="getUsersConfigData('shop.shop_open') == 1"}
  50. <li><a href="{eyou:Diyurl link='user/Shop/shop_centre' /}">我的订单</a></li>
  51. {/eyou:if}
  52. <li><a href="{eyou:Diyurl link='user/Users/collection_index' /}">我的收藏</a></li>
  53. <li><a href="{eyou:Diyurl link='user/Users/logout' /}">安全退出</a></li>
  54. </ul>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="page-main">
  61. <div class="container confirm-box">
  62. <div class="confirm-context">
  63. <div class="confirm-order">
  64. <div class="section section-order">
  65. <div class="order-info clearfix">
  66. <div class="fl">
  67. <h2 class="title">订单提交成功!去付款咯~</h2>
  68. {eyou:if condition="!empty($data.eyCountdownTimes) && !empty($data.paymentExpire)"}
  69. <p class="order-time">
  70. <span>请在<span id="{$data.eyCountdownTimes}" style="color: red;"></span><span>内完成支付, 超时后将取消订单</span></span>
  71. </p>
  72. {/eyou:if}
  73. <p class="post-info" id="address_info">收货信息:{$data.consignee} {$data.mobile} {$data.addressInfo}</p>
  74. </div>
  75. <div class="fr">
  76. {eyou:if condition="!empty($data.points_shop_order)"}
  77. <div class="total">应付总额:<span class="money"><em>{$data.order_amount}</em></span></div>
  78. {eyou:else/}
  79. <div class="total">应付总额:<span class="money"><em>{$data.unified_amount}</em><span>元</span></span></div>
  80. {/eyou:if}
  81. <a href="javascript:void(0);" class="show-detail" data-showhide="hide" onclick="showOrderDetail(this);">订单详情<i class="iconfont"></i></a>
  82. </div>
  83. </div>
  84. <i class="iconfont icon-right"><img src="https://oss.zc10000.com/static/botstrap-step/img_6.png" /></i>
  85. <div class="order-detail J_showOrderDetail" id="J_showOrderDetail">
  86. <ul>
  87. <li class="clearfix">
  88. <div class="label"> 订单号:</div>
  89. <div class="content"><span class="order-num">{$data.unified_number}</span></div>
  90. </li>
  91. <li class="clearfix">
  92. <div class="label"> 收货信息:</div>
  93. <div class="content">{$data.consignee} {$data.mobile} {$data.addressInfo}</div>
  94. </li>
  95. <li class="clearfix">
  96. <div class="label"> 商品名称:</div>
  97. <div class="content">
  98. {eq name='$data.transaction_type' value='2'}
  99. {volist name='$data.order_details' id='goods'}
  100. <span>
  101. {$goods.product_name}&nbsp;
  102. {volist name='$goods.product_spec_list' id='spec'}{$spec.value}&nbsp;{/volist}
  103. </span>
  104. {/volist}
  105. {else /}
  106. <span class="red">{$data.cause}</span>
  107. {/eq}
  108. </div>
  109. </li>
  110. </ul>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="confirm-pay">
  115. <div class="section section-payment mb0">
  116. <div class="cash-title">
  117. <div>{eyou:eq name="$data.use_pay_type" value="0"}未开启支付方式{eyou:else/}选择以下支付方式付款{/eyou:eq}</div>
  118. </div>
  119. <div class="payment-box">
  120. <div class="payment-body">
  121. <ul class="clearfix payment-list J_paymentList">
  122. {$data.payTypeHidden}
  123. {eyou:sppayapilist id='vo'}
  124. {eyou:notempty name="$vo.pay_id"}
  125. <div>
  126. <li class="pay-type-item" data-type="zxzf_{$vo.pay_mark}" data-id="{$vo.pay_id}" data-mark="{$vo.pay_mark}" onclick="selectPayType(this);">
  127. <img src="{$vo.pay_img}">
  128. <i class="el-icon-check"></i>
  129. </li>
  130. </div>
  131. {/eyou:notempty}
  132. {$vo.hidden}
  133. {/eyou:sppayapilist}
  134. <input type="hidden" id="PayID">
  135. <input type="hidden" id="PayMark">
  136. <input type="hidden" id="PayType">
  137. {eyou:if condition="empty($data.shop_open_offline) && empty($data.PromType) && empty($data.onlyVerify) && 2 == $data.transaction_type"}
  138. <div>
  139. <li class="pay-type-item" data-type="hdfk_payOnDelivery" data-id="0" data-mark="payOnDelivery" onclick="selectPayType(this);">
  140. <img src="{eyou:static file='users/skin/images/pay_hdfk.png' /}">
  141. <i class="el-icon-check"></i>
  142. </li>
  143. </div>
  144. {/eyou:if}
  145. {eyou:if condition="1 != $data.transaction_type && 1 == $data.pay_balance_open"}
  146. <div style="position: relative;display: flex;">
  147. <li class="pay-type-item" data-type="yezf_balance" data-id="0" data-mark="balance" onclick="selectPayType(this);">
  148. <img src="{eyou:static file='users/skin/images/pay_yiyou.png' /}">
  149. <i class="el-icon-check"></i>
  150. </li>
  151. <div class="fc9" id="yezf_balance_tips" style="display: none;">可用{$users.users_money}元</div>
  152. </div>
  153. {/eyou:if}
  154. </ul>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="detail-section footer-detail clearfix">
  159. <div class="handle-action">
  160. <div class="operating-button">
  161. <a href="javascript:void(0);" class="btn btn-primary" onclick="submitSelectPay(this);">去结算</a>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <script type="text/javascript">
  170. // 头像框移入移出事件
  171. $(".user-photo").mouseover(function(){
  172. $(".user-drop").show();
  173. });
  174. $(".user-photo").mouseout(function(){
  175. $(".user-drop").hide();
  176. });
  177. // 倒计时
  178. var paymentExpire = "{$data.paymentExpire}";
  179. var eyCountdownTimes = "{$data.eyCountdownTimes}";
  180. if (paymentExpire > 0) {
  181. executeCountdownTimes(paymentExpire);
  182. }
  183. function executeCountdownTimes(ey_totalSeconds) {
  184. // 取模(余数)
  185. var modulo = parseInt(ey_totalSeconds) % (60 * 60 * 24);
  186. // 小时数
  187. var hours = Math.floor(modulo / (60 * 60));
  188. modulo = modulo % (60 * 60);
  189. // 分钟
  190. var minutes = Math.floor(modulo / 60);
  191. // 秒数
  192. var seconds = parseInt(ey_totalSeconds % 60, 10);
  193. // 输出到页面
  194. $('#' + eyCountdownTimes).html(hours + "小时" + minutes + "分" + seconds + "秒");
  195. // 剩余秒数
  196. ey_totalSeconds--;
  197. // 倒计时结束则刷新页面
  198. if (parseInt(ey_totalSeconds) <= -1) {
  199. window.location.reload();
  200. } else {
  201. // 延迟一秒执行自己
  202. setTimeout(function () {
  203. executeCountdownTimes(ey_totalSeconds);
  204. }, 1000);
  205. }
  206. }
  207. function submitSelectPay(obj) {
  208. // 禁止再次点击提交
  209. $(obj).prop("disabled", true).css("pointer-events", "none");
  210. // 支付参数
  211. var pay_id = $('#PayID').val();
  212. var pay_mark = $('#PayMark').val();
  213. // 微信支付、支付宝支付、第三方支付
  214. if (parseInt(pay_id) > 0 && pay_mark) SelectPayMethod(pay_id, pay_mark);
  215. // 余额支付、货到付款
  216. if (parseInt(pay_id) === 0 && pay_mark) {
  217. // 余额支付
  218. if ('balance' == pay_mark) {
  219. if (!unified_id || !unified_number || !transaction_type) layer.msg('订单支付参数缺失,刷新重试', {time: 1500});
  220. $.ajax({
  221. type: 'post',
  222. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
  223. url : '{$RootDir}/index.php?m=user&c=PayApi&a=balance_payment&_ajax=1',
  224. dataType: 'json',
  225. success: function(res) {
  226. layer.closeAll();
  227. if (1 === parseInt(res.code)) {
  228. if (res.data.email) eyUnifiedSendRemind(res.data.email);
  229. if (res.data.mobile) eyUnifiedSendRemind(res.data.mobile);
  230. layer.msg(res.msg, {time: 1500}, function() {
  231. window.location.href = res.url;
  232. });
  233. } else {
  234. payIsRecharge(obj, res.msg, res.url);
  235. }
  236. },
  237. error: function (e) {
  238. layer.closeAll();
  239. showErrorAlert(e.responseText);
  240. }
  241. });
  242. }
  243. // 货到付款
  244. else if ('payOnDelivery' == pay_mark) {
  245. if (!unified_id || !unified_number || !transaction_type) layer.msg('订单支付参数缺失,刷新重试', {time: 1500});
  246. $.ajax({
  247. type: 'post',
  248. data: {unified_id: unified_id, unified_number: unified_number, transaction_type: transaction_type},
  249. url : '{$RootDir}/index.php?m=user&c=PayApi&a=payOnDelivery&_ajax=1',
  250. dataType: 'json',
  251. success: function(res) {
  252. layer.closeAll();
  253. if (1 === parseInt(res.code)) {
  254. if (res.data.email) eyUnifiedSendRemind(res.data.email);
  255. if (res.data.mobile) eyUnifiedSendRemind(res.data.mobile);
  256. layer.msg(res.msg, {time: 1500}, function() {
  257. window.location.href = res.url;
  258. });
  259. } else {
  260. showErrorAlert(res.msg);
  261. }
  262. },
  263. error: function (e) {
  264. layer.closeAll();
  265. showErrorAlert(e.responseText);
  266. }
  267. });
  268. }
  269. }
  270. // 解除再次点击提交
  271. $(obj).prop("disabled", false).css("pointer-events", "");
  272. }
  273. // 是否要去充值
  274. function payIsRecharge(obj, msg ,url) {
  275. unifiedConfirmBox(msg, '', '', function() {
  276. // 去充值
  277. window.open(url);
  278. unifiedConfirmBox('是否充值成功,立即支付?', '', '', function() {
  279. // 立即支付
  280. submitSelectPay(obj);
  281. }, ['立即支付', '其他方式支付'], function(index) {
  282. $(obj).prop("disabled", false).css("pointer-events", "");
  283. layer.closeAll(index);
  284. });
  285. }, ['去充值', '其他方式支付'], function(index) {
  286. $(obj).prop("disabled", false).css("pointer-events", "");
  287. layer.closeAll(index);
  288. });
  289. }
  290. function showOrderDetail(obj) {
  291. var showhide = $(obj).attr('data-showhide');
  292. if ('hide' == showhide) {
  293. $(obj).attr('data-showhide', 'show');
  294. $('#address_info').hide();
  295. $('#J_showOrderDetail').animate({ height: $('#J_showOrderDetail ul').height() + 30 }, 50);
  296. } else {
  297. $(obj).attr('data-showhide', 'hide');
  298. $('#address_info').show();
  299. $('#J_showOrderDetail').animate({ height: '0' }, 50);
  300. }
  301. }
  302. </script>
  303. {eyou:include file="users/users_footer.htm" /}