index.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
  8. <meta http-equiv="Cache" content="no-cache">
  9. <meta http-equiv="pragram" content="no-cache">
  10. <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
  11. <meta http-equiv="pragram" content="no-cache">
  12. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  13. <meta name="apple-mobile-web-app-capable" content="yes" />
  14. <!-- 设置苹果工具栏颜色 -->
  15. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  16. <!-- 忽略页面中的数字识别为电话,忽略email识别 -->
  17. <meta name="format-detection" content="telphone=no, email=no" />
  18. <!-- 启用360浏览器的极速模式(webkit) -->
  19. <meta name="renderer" content="webkit" />
  20. <!-- 避免IE使用兼容模式 -->
  21. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  22. <meta name="HandheldFriendly" content="true" />
  23. <!-- 设置在apple上以应用模式启动时,是否全屏 -->
  24. <meta name="apple-touch-fullscreen" content="yes" />
  25. <!-- windows phone 点击无高光 -->
  26. <meta name="msapplication-tap-highlight" content="no" />
  27. <meta name="referrer" content="no-referrer" />
  28. <title>音乐数字课堂</title>
  29. <style>
  30. body {
  31. background: #f1f5ff;
  32. width: 100%;
  33. }
  34. .bgImg {
  35. width: 23.75vw;
  36. height: 27.1875vw;
  37. }
  38. .btnImg {
  39. width: 15vw;
  40. position: absolute;
  41. left: 50%;
  42. margin-left: -7.5vw;
  43. bottom: 1.61458333vw;
  44. cursor: pointer;
  45. z-index: 100;
  46. }
  47. .imgWrap {
  48. width: 23.75vw;
  49. height: 27.1875vw;
  50. margin: 7.29166667vw auto 0;
  51. position: relative;
  52. z-index: 100;
  53. }
  54. /* margin-top: 300px; */
  55. .textWrap {
  56. margin-top: 7.29166667vw;
  57. text-align: center;
  58. width: 26.04166667vw;
  59. position: absolute;
  60. top: 7.34375vw;
  61. left: 50%;
  62. margin-left: -15vw;
  63. }
  64. .subMsg {
  65. margin-top: 1.66666667vw;
  66. font-size: 1.14583333rem;
  67. line-height: 1.5625vw;
  68. color: #777;
  69. }
  70. .subBtn {
  71. width: 12.03125vw;
  72. height: 3.22916667vw;
  73. background: #198CFE;
  74. border-radius: 0.9375vw;
  75. border: none;
  76. font-size: 1.14583333rem;
  77. font-weight: 600;
  78. color: #FFFFFF;
  79. line-height: 1.5625vw;
  80. cursor: pointer;
  81. margin-top: 1.66666667vw;
  82. list-style: none outside none;
  83. text-decoration: none;
  84. }
  85. </style>
  86. <script type="text/javascript">
  87. function gotoLinlk() {
  88. console.log('点击')
  89. var agent = navigator.userAgent.toLowerCase();
  90. var isMac = function () { return /macintosh|mac os x/i.test(navigator.userAgent); }();
  91. if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
  92. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup32.exe');
  93. }
  94. if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
  95. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup64.exe');
  96. }
  97. if (isMac) {
  98. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/googlechrome-mac.dmg');
  99. }
  100. }
  101. function getChromeVersion() {
  102. var arr = navigator.userAgent.split(' ');
  103. var chromeVersion = '';
  104. for (var i = 0; i < arr.length; i++) {
  105. if (/chrome/i.test(arr[i])) chromeVersion = arr[i];
  106. }
  107. if (chromeVersion) {
  108. return Number(chromeVersion.split('/')[1].split('.')[0]);
  109. } else {
  110. return false;
  111. }
  112. };
  113. function IsFF() {
  114. var sAgent = window.navigator.userAgent.toLowerCase();
  115. if (sAgent.indexOf("firefox") != -1) {
  116. return true;
  117. }
  118. return false;
  119. }
  120. function isChrome() {
  121. var isChromium = window.chrome;
  122. var winNav = window.navigator;
  123. var vendorName = winNav.vendor;
  124. var isOpera = typeof window.opr !== 'undefined';
  125. var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
  126. var isIOSChrome = winNav.userAgent.match('CriOS');
  127. return (
  128. isIOSChrome ||
  129. (isChromium !== null &&
  130. typeof isChromium !== 'undefined' &&
  131. vendorName === 'Google Inc.' &&
  132. isOpera === false &&
  133. isIEedge === false)
  134. );
  135. };
  136. function IEVersion() {
  137. var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  138. var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
  139. var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
  140. var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
  141. if (isIE) {
  142. var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
  143. reIE.test(userAgent);
  144. var fIEVersion = parseFloat(RegExp["$1"]);
  145. if (fIEVersion == 7) {
  146. return 7;
  147. } else if (fIEVersion == 8) {
  148. return 8;
  149. } else if (fIEVersion == 9) {
  150. return 9;
  151. } else if (fIEVersion == 10) {
  152. return 10;
  153. } else {
  154. return 6;//IE版本<=7
  155. }
  156. } else if (isEdge) {
  157. return 'edge';//edge
  158. } else if (isIE11) {
  159. return 11; //IE11
  160. } else {
  161. return -1;//不是ie浏览器
  162. }
  163. }
  164. (function (window) {
  165. window.addEventListener('error', (e) => {
  166. console.log(e, '这是js的报错 希望可以从错误类型判断')
  167. }, true)
  168. // if ('serviceWorker' in navigator) {
  169. // // let refreshing = false
  170. // let flag = caches.keys().length > 0
  171. // console.log(caches.keys(), 'caches.keys()', `是否有缓存${flag}`);
  172. // caches.keys().then(function (cacheNames) {
  173. // cacheNames.forEach(function (cacheName) {
  174. // caches.delete(cacheName);
  175. // });
  176. // if (flag) {
  177. // window.location.reload()
  178. // }
  179. // });
  180. // // 尝试监听install
  181. // }
  182. // let refreshing = false
  183. // navigator.serviceWorker.addEventListener('controllerchange', () => {
  184. // console.log('controllerchange')
  185. // if (refreshing) {
  186. // return
  187. // }
  188. // refreshing = true;
  189. // window.location.reload();
  190. // })
  191. if (!isChrome()) {
  192. // document.writeln("<div class='imgWrap'><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' class='btnImg' alt=''></div>");
  193. if (IEVersion() < 9 && IEVersion() != -1) {
  194. document.writeln(" <div class='textWrap'><h1>当前浏览器版本过低</h1><p class='subMsg'>为了保证良好的上课体验,推荐您使用谷歌浏览器</p> <button class='subBtn' onclick='gotoLinlk()'>下载谷歌浏览器</button>");
  195. document.execCommand("Stop");
  196. } else {
  197. document.writeln(" <div class='imgWrap'><img onabort='this.src=this.src' src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' onabort='this.src=this.src' onclick='gotoLinlk()' class='btnImg' alt=''></div>");
  198. document.execCommand("Stop");
  199. }
  200. } else {
  201. if (getChromeVersion() < 90) {
  202. document.writeln(" <div class='imgWrap'><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' onclick='gotoLinlk()' class='btnImg' alt=''></div>");
  203. document.execCommand("Stop");
  204. window.stop()
  205. console.log('Stop')
  206. }
  207. // if (IsFF()) {
  208. }
  209. })(window);
  210. </script>
  211. <script type="module" crossorigin src="./index-f1437954-1693892427134.js"></script>
  212. <link rel="stylesheet" href="./index-471ac4fe.css">
  213. <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
  214. <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
  215. <link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
  216. <!-- 按钮 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png -->
  217. <!-- 背景 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png -->
  218. <body class="myBody">
  219. <div id="app"></div>
  220. <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
  221. <script nomodule crossorigin id="vite-legacy-polyfill" src="./polyfills-legacy-8e22e21e-1693892427134.js"></script>
  222. <script nomodule crossorigin id="vite-legacy-entry" data-src="./index-legacy-2570553b-1693892427134.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
  223. </body>
  224. </html>