wechat.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>pay</title>
  6. </head>
  7. <body>
  8. <div class="loading"></div>
  9. </body>
  10. <script type="text/javascript" src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  11. <script>
  12. function getQueryString(name, url) {
  13. let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  14. let r = url.substr(1).match(reg);
  15. if (r != null) {
  16. return unescape(r[2]);
  17. }
  18. return null;
  19. }
  20. // let mweb_url = getQueryString('mweb_url', window.location.search);
  21. let url = window.location.search;
  22. console.log('url', url)
  23. let indexOfChar = url.indexOf('mweb_url='); // 获取字符'a'的索引
  24. let mweb_url = url.slice(indexOfChar); // 从该索引开始截取到末尾
  25. console.log('mweb_url', mweb_url)
  26. $(function() {
  27. // test
  28. // let redirect_url = 'https://nc-fele-mips.elken.com:8015/return.html';
  29. // prod
  30. let redirect_url = 'https://fele.ncshop.elken.com/return.html';
  31. console.log('replace-o', mweb_url + '&redirect_url=' + encodeURIComponent(redirect_url))
  32. // window.location.replace(mweb_url + '&redirect_url=' + encodeURIComponent(redirect_url))
  33. });
  34. </script>
  35. <style>
  36. html{
  37. width: 100%;
  38. height: 100%;
  39. overflow: hidden;
  40. }
  41. body{
  42. width: 100%;
  43. height: 100%;
  44. overflow: hidden;
  45. }
  46. .payment {
  47. width: 100%;
  48. height: 100%;
  49. }
  50. .loading {
  51. position: relative;
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .loading::before {
  56. content: '';
  57. position: absolute;
  58. top: 50%;
  59. left: 50%;
  60. transform: translate(-50%, -50%);
  61. width: 50px;
  62. height: 50px;
  63. border-radius: 50%;
  64. border: 3px solid rgba(0, 0, 0, .2);
  65. border-top-color: #000;
  66. animation: rotate 1s infinite linear;
  67. }
  68. @keyframes rotate {
  69. to {
  70. transform: translate(-50%, -50%) rotate(360deg);
  71. }
  72. }
  73. </style>
  74. </html>