agreement.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. @media screen and (max-width: 750px) {
  10. html {
  11. font-size: calc(100vw/7.5);
  12. }
  13. }
  14. @media screen and (min-width: 750px) {
  15. html {
  16. font-size: calc(750px/7.5);
  17. }
  18. }
  19. body {
  20. padding: 0.3rem;
  21. }
  22. h1 {
  23. font-size: 0.32rem;
  24. }
  25. h2 {
  26. font-size: 0.31rem;
  27. }
  28. h3 {
  29. font-size: 0.3rem;
  30. }
  31. h4 {
  32. font-size: 0.29rem;
  33. }
  34. h5 {
  35. font-size: 0.28rem;
  36. }
  37. h6 {
  38. font-size: 0.27rem;
  39. }
  40. p {
  41. font-size: 0.28rem;
  42. color: #333;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. </body>
  48. </html>
  49. <script src="../static/js/vender/config.js"></script>
  50. <script type="text/javascript" src="../static/js/vender/jquery-3.4.1.min.js"></script>
  51. <script>
  52. var agreementCoding = GetRequest().agreementCoding ? GetRequest().agreementCoding : 'XYPZYSXY2001'
  53. console.log(agreementCoding);
  54. $.ajax({
  55. url: baseUrl + "/api/public/v4/agreement/content",
  56. data: {
  57. agreementCoding: agreementCoding
  58. },
  59. type: 'get',
  60. dataType: 'json',
  61. success: function (res) {
  62. if (res.status === 0) {
  63. var pos1 = res.data.content.lastIndexOf('<body>') + 6
  64. var pos2 = res.data.content.lastIndexOf('</body>')
  65. var content = pos1 >= 0 && pos2 >= 0 ? res.data.content.slice(pos1, pos2) : res.data.content
  66. $('body').append(content);
  67. }
  68. }
  69. })
  70. </script>