failed.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
  6. <title>支付失败</title>
  7. <link href="__STATIC__/h5sdk/css/index.css?v={:config('js_version')}" rel="stylesheet">
  8. </head>
  9. <body>
  10. <div id="payFailPop" class="pop">
  11. <div class="pop_body">
  12. <div class="payment">
  13. <div class="payment_head">
  14. <span class="payment_title">支付</span>
  15. <a href="javascript:;" class="payment_close icon_close"></a>
  16. </div>
  17. <div class="payment_body">
  18. <div class="payment_status__msg text-danger">
  19. <i class="payment_status__failed icon_fail"></i> {$msg}
  20. </div>
  21. <div class="payment_status__btn">
  22. <button type="button" class="payment_button">确认</button>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <script src="__STATIC__/h5sdk/js/huosdk.js?v={:config('js_version')}"></script>
  29. <script>
  30. var return_url = '{$return_url}'
  31. $('.payment_button').click(function () {
  32. // 在 ios 网页 sdk 内
  33. if (window.huo && window.huo.closecontentview) {
  34. window.huo.closecontentview()
  35. }
  36. // 存在回调地址
  37. if (return_url != '') {
  38. window.location.href = return_url
  39. }
  40. window.parent.postMessage({
  41. type: 'pay.retry'
  42. }, '*')
  43. window.parent.postMessage({
  44. type: 'frame.close'
  45. }, '*')
  46. })
  47. $('.payment_close').click(function () {
  48. // 在 ios 网页 sdk 内
  49. if (window.huo && window.huo.closecontentview) {
  50. window.huo.closecontentview()
  51. }
  52. // 存在回调地址
  53. if (return_url != '') {
  54. window.location.href = return_url
  55. }
  56. window.parent.postMessage({
  57. type: 'frame.close'
  58. }, '*')
  59. })
  60. </script>
  61. </body>
  62. </html>