pay.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>黑龙江昆仑盛和安体检中心</title>
  6. <link rel="stylesheet" type="text/css" href="/style/common.css"/>
  7. <link rel="stylesheet" type="text/css" href="/style/shop.css"/>
  8. <!--[if lt IE 9]>
  9. <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
  10. <![endif]-->
  11. <!--窗口自适应适配低端IE-->
  12. <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
  13. <style type="text/css">
  14. .show {
  15. display: block;
  16. }
  17. .hidden {
  18. display: none;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div th:include="fragments :: header"></div>
  24. <div class="wp">
  25. <div class="main bgFF">
  26. <div class="d-view">
  27. <div class="f14 bgF4 h32 lh32 pl20 mt20">商品清单</div>
  28. <table class="tab-1-EEE mt15">
  29. <thead>
  30. <tr>
  31. <td>商品</td>
  32. <td>单价</td>
  33. <td>数量</td>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <tr th:each="item : ${buyOrder.items}">
  38. <td>
  39. <img th:attr="src=${item.good.icon}" class="bor-img w60 h60 l mr5" />
  40. <span class="f12 c666" th:text="${item.good.name}"></span>
  41. </td>
  42. <td th:text="'¥' + ${item.price}"></td>
  43. <td th:text="x + ${item.num}"></td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. <div class="mt20 cOrange f12 fb">购买体检商品后您可以在个人中心直接预约体检时间</div>
  48. <div class="f14 bgF4 h32 lh32 pl20 mt20">发票信息</div>
  49. <div class="tab-fb mt20">
  50. <div class="o-rdo">
  51. <input name="fapiao" checked="checked" type="radio" value="0" id="t1" class="fapiao" />
  52. <label for="t1">不需要发票</label>
  53. </div>
  54. <div class="o-rdo">
  55. <input name="fapiao" type="radio" value="1" id="t2" class="fapiao" />
  56. <label for="t2">需要发票</label>
  57. </div>
  58. </div>
  59. <div class="clearfix"></div>
  60. <div class="fp-view" id="show" style="display:none; ">
  61. <h3>发票信息</h3>
  62. <dl><dt>发票抬头:</dt>
  63. <dd><input name="" type="text" class="txt" /></dd>
  64. </dl>
  65. <dl><dt>纳税人识别号:</dt>
  66. <dd><input name="" type="text" class="txt" placeholder="非个人开票请必须填写" /></dd>
  67. </dl>
  68. <dl><dt>发票明细:</dt>
  69. <dd>体检服务</dd>
  70. </dl>
  71. <dl><dt>收件人:</dt>
  72. <dd><input name="" type="text" class="txt" /></dd>
  73. </dl>
  74. <dl><dt>快递地址:</dt>
  75. <dd><input name="" type="text" class="txt" /></dd>
  76. </dl>
  77. <dl><dt>联系电话:</dt>
  78. <dd><input name="" type="text" class="txt" /></dd>
  79. </dl>
  80. </div>
  81. <div class="f14 bgF4 h32 lh32 pl20 mt20">支付方式</div>
  82. <div class="clearfix ov-h mt20">
  83. <div class="o-rdo alzf">
  84. <input name="zhifu" checked="checked" type="radio" value="1" id="z1" />
  85. <label for="z1"></label>
  86. </div>
  87. <div class="o-rdo wxzf">
  88. <input name="zhifu" type="radio" value="2" id="z2" />
  89. <label for="z2"></label>
  90. </div>
  91. </div>
  92. <div class="lineDDD mt20"></div>
  93. <div class="d-view-list">
  94. <div class="clearfix ov-h">
  95. <dl>
  96. <dt>
  97. 共计 <em class="cOrange" th:text="${totalNum}"></em> 件商品:
  98. </dt>
  99. <dd th:text="'¥' + ${buyOrder.totalPrice}"></dd>
  100. </dl>
  101. <dl><dt>应付金额:</dt>
  102. <dd th:text="'¥' + ${buyOrder.totalPrice}"></dd>
  103. </dl>
  104. </div>
  105. <div class="h50 mt10 bgF4"><button id="startPay">支付</button><span class="f24" th:text="'商品总计:¥' + ${buyOrder.totalPrice}"><strong></strong></span></div>
  106. </div>
  107. <div class="d-view-list hidden" style="text-align: center; height: 300px;" id="qrCodeDiv" >
  108. <div id="qrCodeDiv" class="show">
  109. <div style="margin-bottom: 10px;">请扫描下方二维码支付</div>
  110. <div id="qrCode">
  111. </div>
  112. </div>
  113. <div id="payedDiv" class="hidden" style="margin-top: 40px;">
  114. <div style="font-size: 60px;">
  115. <img src="/images/ok.png" alt="" style="height: 40px;"/>
  116. 支付完成
  117. </div>
  118. <div style="margin-top: 20px;">
  119. <a href="#" style="color: #0FAFD4">预约体检</a>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <div th:replace="fragments :: footer"></div>
  127. <link rel="stylesheet" type="text/css" href="/js/plugs/modal/jquery.modal.css"/>
  128. <script type="text/javascript" src="/js/plugs/modal/jquery.modal.js"></script>
  129. <script type="text/javascript" src="/js/jquery.qrcode.min.js"></script>
  130. <script th:inline="javascript">
  131. $(".fapiao").click(function() {
  132. if ($(this).attr("value") == "1")
  133. $("#show").show();
  134. else
  135. $("#show").hide();
  136. });
  137. $("#startPay").click(function(){
  138. var paytype = $('input[name="zhifu"]:checked').val();
  139. var orderid = [[${buyOrder.id}]];
  140. $.get("/pay/createPayQRCode/" + orderid + "/" + paytype, function(data){
  141. if (data.code == 0){
  142. $("#qrCode").empty();
  143. $("#qrCode").qrcode(data.obj);
  144. $("#qrCodeDiv").modal();
  145. }
  146. });
  147. setInterval(function(){
  148. $.get("/payquery/" + orderid, function(data){
  149. if (data.code == 0){
  150. if (data.obj){
  151. $("#qrCodeDiv").hide();
  152. $("#payedDiv").show();
  153. }
  154. }
  155. })
  156. },1000)
  157. });
  158. </script>
  159. </body>
  160. </html>