payment.htm 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##tlayout("wap/layout.htm",{head_title:"订单支付"}){
  2. <div class="body">
  3. <div class="pay_choose">
  4. <div class="tip_title">订单信息</div>
  5. <div class="wells_row wells_row_notomargin">
  6. <div class="wells_item">
  7. <span class="wells_item_hd">订单号</span>
  8. <span class="right_title right_title_w100">
  9. ${orders.code!}
  10. </span>
  11. </div>
  12. <div class="wells_item">
  13. <span class="wells_item_hd">创建时间</span>
  14. <span class="right_title right_title_w100">
  15. ${orders.create_date!,dateFormat='yyyy-MM-dd HH:mm'}
  16. </span>
  17. </div>
  18. <div class="wells_item">
  19. <span class="wells_item_hd">商品小计</span>
  20. <span class="right_title right_title_w100">
  21. <div class="color_red">¥${orders.subtotal!}</div>
  22. </span>
  23. </div>
  24. <div class="wells_item">
  25. <span class="wells_item_hd">运费</span>
  26. <span class="right_title right_title_w100">
  27. <div class="color_red">¥${orders.freight_price!}</div>
  28. </span>
  29. </div>
  30. <div class="wells_item">
  31. <span class="wells_item_hd">总计</span>
  32. <span class="right_title right_title_w100">
  33. <div class="color_red">¥${orders.grand_total!}</div>
  34. </span>
  35. </div>
  36. ##if(orders.invoice_name!=null && orders.invoice_name!=""){
  37. <div class="wells_item">
  38. <span class="wells_item_hd">发票抬头</span>
  39. <span class="right_title right_title_w100">
  40. ${orders.invoice_name!}
  41. </span>
  42. </div>
  43. ##}
  44. ##if(orders.invoice_number!=null && orders.invoice_number!=""){
  45. <div class="wells_item">
  46. <span class="wells_item_hd">发票税号</span>
  47. <span class="right_title right_title_w100">
  48. ${orders.invoice_number!}
  49. </span>
  50. </div>
  51. ##}
  52. ##if(orders.remark!=null && orders.remark!=""){
  53. <div class="wells_item">
  54. <span class="wells_item_hd">订单备注</span>
  55. <span class="right_title right_title_w100">
  56. ${orders.remark!}
  57. </span>
  58. </div>
  59. ##}
  60. </div>
  61. </div>
  62. <div class="weui_btn_area">
  63. <a href="javascript:void(0)" onclick="wxPay()" class="weui_btn btn_success">微信支付</a>
  64. </div>
  65. <div class="weui_btn_area">
  66. <a href="/wap/shop/bankPay?code=${orders.code!}" class="weui_btn btn_detail">银行卡支付</a>
  67. </div>
  68. </div>
  69. <a href="/wap" class="goback"><span>首页</span></a>
  70. <script>
  71. var new_post=1;
  72. function wxPay(){
  73. if(new_post==1){
  74. new_post=0;
  75. $.post("/wap/shop/getPackage",{code:"${orders.code!}"},function(data){
  76. if(data.success){
  77. WeixinJSBridge.invoke('getBrandWCPayRequest',{
  78. "appId":data.appId,
  79. "timeStamp":data.timeStamp,
  80. "nonceStr":data.nonceStr,
  81. "package":data._package,
  82. "signType": "MD5",
  83. "paySign":data.paySign
  84. },
  85. function(res){
  86. new_post=1;
  87. if(res.err_msg=='get_brand_wcpay_request:ok'){
  88. setTimeout(function(){
  89. window.location.href="/wap/user/orders";
  90. }, 1500);
  91. }else{
  92. alert("支付失败");
  93. }
  94. });
  95. }else{
  96. alert(data.msg);
  97. }
  98. });
  99. }else{
  100. alert("支付请求中...");
  101. return;
  102. }
  103. }
  104. </script>
  105. ##}