index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. <meta name="description" content="管乐迷APP,是国内首款专为管乐在线教学打造的专业级平台,丰富、便捷的学习工具,让管乐教学与学习更轻松。">
  8. <title>管乐迷</title>
  9. <link rel="stylesheet" href="index.css">
  10. <script src="../helpers/rem-fit.min.js"></script>
  11. <script src="../helpers/qs.min.js"></script>
  12. <script src="../helpers/html-to-image.js"></script>
  13. <script>
  14. var remFit = new RemFit(375, true)
  15. remFit.init()
  16. window.addEventListener('resize', function () {
  17. remFit.init()
  18. })
  19. var parseSearch = Qs.parse(window.location.search, { ignoreQueryPrefix: true })
  20. </script>
  21. <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/plyr@3.6.8/dist/plyr.css"> -->
  22. </head>
  23. <body>
  24. <div class="content">
  25. <div class="tag"></div>
  26. <div class="userinfo">
  27. <img id="avatar" crossOrigin="anonymous" />
  28. <div class="cont">
  29. <p class="name" id="name"></p>
  30. <p class="sub" id="subjectName"></p>
  31. </div>
  32. </div>
  33. <div class="desc">
  34. <div class="tit">我在管乐迷智能评测获得了<span id="score"></span>分!</div>
  35. <div class="info" id="examSongName"></div>
  36. </div>
  37. <div class="fraction" style="display: none;">
  38. <div class="item" id="intonation">
  39. <div class="decs">音准</div>
  40. <div class="view"><span id="intonation-view"></span></div>
  41. <div class="val" id="intonation-val"></div>
  42. </div>
  43. </div>
  44. <div class="fraction" style="display: none;">
  45. <div class="item" id="cadence">
  46. <div class="decs">节奏</div>
  47. <div class="view"><span id="cadence-view"></span></div>
  48. <div class="val" id="cadence-val"></div>
  49. </div>
  50. </div>
  51. <div class="fraction" style="display: none;">
  52. <div class="item" id="integrity">
  53. <div class="decs">节奏</div>
  54. <div class="view"><span id="integrity-view"></span></div>
  55. <div class="val" id="integrity-val"></div>
  56. </div>
  57. </div>
  58. <div class="line"></div>
  59. <div class="app">
  60. <div class="app-info">
  61. <div class="app-title">管乐迷</div>
  62. <div class="app-desc">管乐学习的<span>不二选择</span></div>
  63. <div class="app-subtitle">云练习见证你的成长!</div>
  64. </div>
  65. <img src="./icons/qrcode.png" />
  66. </div>
  67. </div>
  68. <script>
  69. document.getElementById('avatar').src = (decodeURIComponent(parseSearch.avatar) || './icons/avatar.png') + '?v=' + parseInt(Math.random() * 10000000)
  70. document.getElementById('name').innerText = parseSearch.name || ''
  71. document.getElementById('subjectName').innerText = parseSearch.subjectName || ''
  72. document.getElementById('examSongName').innerText = parseSearch.examSongName || ''
  73. document.getElementById('score').innerText = parseSearch.score || ''
  74. if (parseSearch.intonation) {
  75. document.getElementById('intonation').parentElement.style.display = 'flex'
  76. document.getElementById('intonation-val').innerText = parseSearch.intonation || ''
  77. document.getElementById('intonation-view').style.width = parseSearch.intonation + '%' || ''
  78. }
  79. if (parseSearch.cadence) {
  80. document.getElementById('cadence').parentElement.style.display = 'flex'
  81. document.getElementById('cadence-val').innerText = parseSearch.cadence || ''
  82. document.getElementById('cadence-view').style.width = parseSearch.cadence + '%' || ''
  83. }
  84. if (parseSearch.integrity) {
  85. document.getElementById('integrity').parentElement.style.display = 'flex'
  86. document.getElementById('integrity-val').innerText = parseSearch.integrity || ''
  87. document.getElementById('integrity-view').style.width = parseSearch.integrity + '%' || ''
  88. }
  89. window.addEventListener('load', function () {
  90. htmlToImage.toPng(document.body)
  91. .then(() => htmlToImage.toPng(document.body))
  92. .then(res => {
  93. if (window.setPng) {
  94. window.setPng(res)
  95. }
  96. })
  97. })
  98. </script>
  99. <!-- <script src="./index.js"></script> -->
  100. </body>
  101. </html>