instrument.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport"
  6. content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
  7. <title>AI学练</title>
  8. <link rel="icon" href="/favicon.ico?v=1" />
  9. <script src="/flexible.js" charset="UTF-8"></script>
  10. <style>
  11. #loading {
  12. position: fixed;
  13. left: 50%;
  14. top: 50%;
  15. transform: translate(-50%, -50%);
  16. display: none;
  17. }
  18. #loading.show {
  19. display: block;
  20. }
  21. </style>
  22. <script>
  23. function _postMessage(data, callback) {
  24. const instance = window.COLEXIU || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.COLEXIU)
  25. if (instance) {
  26. instance.postMessage(JSON.stringify(data))
  27. }
  28. }
  29. if (!location.href.includes('iscurseplay=play') && !location.href.includes('isPreView=true')) {
  30. _postMessage({
  31. api: 'cloudLoading',
  32. content: {
  33. show: true,
  34. type: 'fullscreen',
  35. },
  36. })
  37. }
  38. </script>
  39. </head>
  40. <body>
  41. <div id="app"></div>
  42. <img id="loading" class="show" src="/loading.svg" alt="loading" />
  43. <script>
  44. // 处理课堂乐器老师端打开听音练习时去掉加载动画
  45. if (location.href.indexOf('view-figner') >= 0 && location.href.indexOf('platform=pc') >= 0 && location.href.indexOf('linkSource=class') < 0) {
  46. var _loading = document.getElementById("loading");
  47. _loading && document.body.removeChild(_loading);
  48. }
  49. </script>
  50. <script type="module" src="/src/page-instrument/main.ts"></script>
  51. </body>
  52. </html>