index.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <base href="/">
  5. <meta charset="UTF-8">
  6. <meta content="IE=Edge" http-equiv="X-UA-Compatible">
  7. <meta name="description" content="Designed by Justin@VINNO">
  8. <!-- iOS meta tags & icons -->
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="apple-mobile-web-app-title" content="VINNO工时计算系统">
  12. <link rel="icon" type="image/png" href="favicon.png" />
  13. <script src="setting.js"></script>
  14. <script src="flutter.js" defer></script>
  15. <title>VINNO工时计算系统</title>
  16. </head>
  17. <body>
  18. <div id="loading">
  19. <style>
  20. body {
  21. inset: 0;
  22. overflow: hidden;
  23. margin: 0;
  24. padding: 0;
  25. position: fixed;
  26. background-color: white;
  27. }
  28. #loading {
  29. position: fixed;
  30. top: 50%;
  31. left: 50%;
  32. -webkit-transform: translate(-50%, -50%);
  33. -ms-transform: translate(-50%, -50%);
  34. -moz-transform: translate(-50%, -50%);
  35. -o-transform: translate(-50%, -50%);
  36. transform: translate(-50%, -50%);
  37. }
  38. #loading img {
  39. animation: 1s ease-in-out 0s infinite alternate breathe;
  40. opacity: .66;
  41. transition: opacity .4s;
  42. }
  43. #loading.main_done img {
  44. opacity: 1;
  45. }
  46. #loading.init_done img {
  47. animation: .33s ease-in-out 0s 1 forwards zooooom;
  48. opacity: .05;
  49. }
  50. @keyframes breathe {
  51. from {
  52. transform: scale(1)
  53. }
  54. to {
  55. transform: scale(0.95)
  56. }
  57. }
  58. @keyframes zooooom {
  59. from {
  60. transform: scale(1)
  61. }
  62. to {
  63. transform: scale(10)
  64. }
  65. }
  66. </style>
  67. <img src="icons/loading.png" />
  68. <div id="loading_status" style="text-align: center; color: black;">正在下载运行库...</div>
  69. </div>
  70. <!-- Ensure first time loading progress is gone after app loads -->
  71. <script>
  72. function jumpToUrl(url) {
  73. window.location.href = url;
  74. }
  75. function sleep(delay) {
  76. var start = new Date().getTime();
  77. var end = start + delay;
  78. while(true){
  79. if(new Date().getTime() > end){
  80. return;
  81. }
  82. }
  83. }
  84. var serviceWorkerVersion = null;
  85. var scriptLoaded = false;
  86. window.addEventListener('load', function (ev) {
  87. var loading = document.querySelector('#loading');
  88. var loading_status = document.querySelector('#loading_status');
  89. // Download main.dart.js
  90. _flutter.loader.loadEntrypoint({
  91. //entrypointUrl: 'https://static-1300984704.cos.ap-shanghai.myqcloud.com/main.dart.js',
  92. serviceWorker: {
  93. serviceWorkerVersion: serviceWorkerVersion,
  94. }
  95. }).then(function (engineInitializer) {
  96. loading.classList.add('main_done');
  97. loading_status.innerHTML = '正在下载渲染引擎...';
  98. return engineInitializer.initializeEngine({
  99. //canvasKitBaseUrl: 'https://static-1300984704.cos.ap-shanghai.myqcloud.com/'
  100. });
  101. }).then(function (appRunner) {
  102. loading_status.innerHTML = '系统启动中...';
  103. loading.classList.add('init_done');
  104. return appRunner.runApp();
  105. }).then(function (app) {
  106. window.setTimeout(function () {
  107. loading.remove();
  108. }, 200);
  109. });
  110. });
  111. </script>
  112. </body>
  113. </html>