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. let indexOfChar = url.indexOf('='); // 获取字符'a'的索引
  23. let mweb_url = url.slice(indexOfChar + 1); // 从该索引开始截取到末尾
  24. console.log('mweb_url', mweb_url)
  25. $(function() {
  26. // test
  27. // let redirect_url = 'https://nc-fele-mips.elken.com:8015/return.html';
  28. // prod
  29. let redirect_url = 'https://fele.ncshop.elken.com/return.html';
  30. console.log('replace-o', mweb_url + '&redirect_url=' + encodeURIComponent(redirect_url))
  31. // window.location.replace(mweb_url + '&redirect_url=' + encodeURIComponent(redirect_url))
  32. });
  33. </script>
  34. <style>
  35. html{
  36. width: 100%;
  37. height: 100%;
  38. overflow: hidden;
  39. }
  40. body{
  41. width: 100%;
  42. height: 100%;
  43. overflow: hidden;
  44. }
  45. .payment {
  46. width: 100%;
  47. height: 100%;
  48. }
  49. .loading {
  50. position: relative;
  51. width: 100%;
  52. height: 100%;
  53. }
  54. .loading::before {
  55. content: '';
  56. position: absolute;
  57. top: 50%;
  58. left: 50%;
  59. transform: translate(-50%, -50%);
  60. width: 50px;
  61. height: 50px;
  62. border-radius: 50%;
  63. border: 3px solid rgba(0, 0, 0, .2);
  64. border-top-color: #000;
  65. animation: rotate 1s infinite linear;
  66. }
  67. @keyframes rotate {
  68. to {
  69. transform: translate(-50%, -50%) rotate(360deg);
  70. }
  71. }
  72. </style>
  73. </html>