instrument.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport"
  6. content="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. _postMessage({
  30. api: 'cloudLoading',
  31. content: {
  32. show: true,
  33. type: 'fullscreen',
  34. },
  35. })
  36. </script>
  37. </head>
  38. <body>
  39. <div id="app"></div>
  40. <img id="loading" class="show" src="/loading.svg" alt="loading" />
  41. <script type="module" src="/src/page-instrument/main.ts"></script>
  42. </body>
  43. </html>