colexiu-report.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. function getBroswer() {
  13. var Sys = {};
  14. var ua = navigator.userAgent.toLowerCase();
  15. var s;
  16. (s = ua.match(/edge\/([\d.]+)/)) ? Sys.edge = s[1] :
  17. (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
  18. (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
  19. (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
  20. (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
  21. (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
  22. (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
  23. if (Sys.edge) return { broswer: "Edge", version: Sys.edge };
  24. if (Sys.ie) return { broswer: "IE", version: Sys.ie };
  25. if (Sys.firefox) return { broswer: "Firefox", version: Sys.firefox };
  26. if (Sys.chrome) return { broswer: "Chrome", version: Sys.chrome };
  27. if (Sys.opera) return { broswer: "Opera", version: Sys.opera };
  28. if (Sys.safari) return { broswer: "Safari", version: Sys.safari };
  29. return { broswer: "", version: "0" };
  30. }
  31. var broswer = getBroswer();
  32. window.addEventListener('DOMContentLoaded', function () {
  33. if (broswer.broswer === 'Chrome' && parseFloat(broswer.version) <= 50) {
  34. document.getElementById('update').className = 'show'
  35. document.getElementById('loading').className = ''
  36. }
  37. })
  38. function _postMessage(data, callback) {
  39. const instance = window.ORCHESTRA || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.ORCHESTRA)
  40. if (instance) {
  41. const uuid = '' + Date.now() + Math.floor(Math.random() * 1000000)
  42. data.content = data.content ? { ...data.content, uuid } : { uuid }
  43. console.log('h5发送:', JSON.stringify(data))
  44. instance.postMessage(JSON.stringify(data))
  45. }
  46. }
  47. // 安卓的状态栏
  48. _postMessage({
  49. api: 'setStatusBarVisibility',
  50. content: {
  51. isVisibility: 0,
  52. },
  53. })
  54. _postMessage({
  55. api: 'setTitleBarVisibility',
  56. content: {
  57. status: 0,
  58. },
  59. })
  60. </script>
  61. <style>
  62. #lottieWebWrap{
  63. position: fixed;
  64. top: 0;
  65. left: 0;
  66. width: 100vw;
  67. height: 100vh;
  68. display: flex;
  69. justify-content: center;
  70. align-items: center;
  71. z-index: 100;
  72. pointer-events: none;
  73. transition: opacity .3s;
  74. }
  75. #lottieWeb {
  76. width: 100Px;
  77. height: 100Px;
  78. }
  79. </style>
  80. </head>
  81. <body>
  82. <div id="app"></div>
  83. <div id="lottieWebWrap">
  84. <div id="lottieWeb"></div>
  85. </div>
  86. <script>
  87. lottie.loadAnimation({
  88. container: document.getElementById('lottieWeb'),
  89. renderer: 'svg',
  90. width: '30px',
  91. height: '30px',
  92. loop: true,
  93. autoplay: true,
  94. path: '/orchestra-music-score/loading.json'
  95. });
  96. window.addEventListener('load', function () {
  97. const loadingEle = document.getElementById('lottieWebWrap')
  98. loadingEle.style.opacity = '0'
  99. setTimeout(() => {
  100. loadingEle.style.display = 'none'
  101. }, 1000)
  102. })
  103. </script>
  104. <script type="module" src="/src/subpages/colexiu-report/main.ts"></script>
  105. </body>
  106. </html>