index.html 10 KB

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