index.html 10 KB

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