colexiu-report.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="ZH-cn">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="icon" href="/favicon.ico" />
  6. <meta name="description" content="酷乐秀APP,器乐学习的不二选择">
  7. <title>评测记录</title>
  8. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  9. <script src="/helpers/lottie.min.js"></script>
  10. <link href="/vant.css" rel="stylesheet">
  11. <script>
  12. this.globalThis || (this.globalThis = this)
  13. </script>
  14. <script>
  15. function getBroswer() {
  16. var Sys = {};
  17. var ua = navigator.userAgent.toLowerCase();
  18. var s;
  19. (s = ua.match(/edge\/([\d.]+)/)) ? Sys.edge = s[1] :
  20. (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
  21. (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
  22. (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
  23. (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
  24. (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
  25. (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
  26. if (Sys.edge) return { broswer: "Edge", version: Sys.edge };
  27. if (Sys.ie) return { broswer: "IE", version: Sys.ie };
  28. if (Sys.firefox) return { broswer: "Firefox", version: Sys.firefox };
  29. if (Sys.chrome) return { broswer: "Chrome", version: Sys.chrome };
  30. if (Sys.opera) return { broswer: "Opera", version: Sys.opera };
  31. if (Sys.safari) return { broswer: "Safari", version: Sys.safari };
  32. return { broswer: "", version: "0" };
  33. }
  34. var broswer = getBroswer();
  35. window.addEventListener('DOMContentLoaded', function () {
  36. if (broswer.broswer === 'Chrome' && parseFloat(broswer.version) <= 50) {
  37. document.getElementById('update').className = 'show'
  38. document.getElementById('loading').className = ''
  39. }
  40. })
  41. function _postMessage(data, callback) {
  42. const instance = window.ORCHESTRA || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.ORCHESTRA)
  43. if (instance) {
  44. const uuid = '' + Date.now() + Math.floor(Math.random() * 1000000)
  45. data.content = data.content ? { ...data.content, uuid } : { uuid }
  46. console.log('h5发送:', JSON.stringify(data))
  47. instance.postMessage(JSON.stringify(data))
  48. }
  49. }
  50. // 安卓的状态栏
  51. _postMessage({
  52. api: 'setStatusBarVisibility',
  53. content: {
  54. isVisibility: 0,
  55. },
  56. })
  57. _postMessage({
  58. api: 'setTitleBarVisibility',
  59. content: {
  60. status: 0,
  61. },
  62. })
  63. </script>
  64. <style>
  65. #lottieWebWrap{
  66. position: fixed;
  67. top: 0;
  68. left: 0;
  69. width: 100vw;
  70. height: 100vh;
  71. display: flex;
  72. justify-content: center;
  73. align-items: center;
  74. z-index: 100;
  75. pointer-events: none;
  76. transition: opacity .3s;
  77. }
  78. #lottieWeb {
  79. width: 100Px;
  80. height: 100Px;
  81. }
  82. </style>
  83. </head>
  84. <body>
  85. <div id="app"></div>
  86. <div id="lottieWebWrap">
  87. <div id="lottieWeb"></div>
  88. </div>
  89. <script>
  90. lottie.loadAnimation({
  91. container: document.getElementById('lottieWeb'),
  92. renderer: 'svg',
  93. width: '30px',
  94. height: '30px',
  95. loop: true,
  96. autoplay: true,
  97. path: '/orchestra-music-score/loading.json'
  98. });
  99. window.addEventListener('load', function () {
  100. const loadingEle = document.getElementById('lottieWebWrap')
  101. loadingEle.style.opacity = '0'
  102. setTimeout(() => {
  103. loadingEle.style.display = 'none'
  104. }, 1000)
  105. })
  106. </script>
  107. <script type="module" src="/src/subpages/colexiu-report/main.ts"></script>
  108. </body>
  109. </html>