index.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. <!-- 设置苹果工具栏颜色 -->
  12. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  13. <!-- 忽略页面中的数字识别为电话,忽略email识别 -->
  14. <meta name="format-detection" content="telphone=no, email=no" />
  15. <!-- 启用360浏览器的极速模式(webkit) -->
  16. <meta name="renderer" content="webkit" />
  17. <!-- 避免IE使用兼容模式 -->
  18. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  19. <meta name="HandheldFriendly" content="true" />
  20. <!-- 设置在apple上以应用模式启动时,是否全屏 -->
  21. <meta name="apple-touch-fullscreen" content="yes" />
  22. <!-- windows phone 点击无高光 -->
  23. <meta name="msapplication-tap-highlight" content="no" />
  24. <meta name="referrer" content="no-referrer" />
  25. <title>老师端</title>
  26. <style>
  27. body {
  28. background: #f1f5ff;
  29. width: 100%;
  30. overflow-x: hidden;
  31. }
  32. .bgImg {
  33. width: 456Px;
  34. height: 522Px;
  35. }
  36. .btnImg {
  37. width: 288Px;
  38. position: absolute;
  39. left: 50%;
  40. margin-left: -144Px;
  41. bottom: 31Px;
  42. cursor: pointer;
  43. z-index: 100;
  44. }
  45. .imgWrap {
  46. width: 456Px;
  47. height: 522Px;
  48. margin: 140Px auto 0;
  49. position: relative;
  50. z-index: 100;
  51. }
  52. /* margin-top: 300px; */
  53. .textWrap {
  54. margin-top: 140Px;
  55. text-align: center;
  56. width: 500Px;
  57. position: absolute;
  58. top: 141Px;
  59. left: 50%;
  60. margin-left: -288Px;
  61. }
  62. .subMsg {
  63. margin-top: 32Px;
  64. font-size: 22Px;
  65. line-height: 30Px;
  66. color: #777;
  67. }
  68. .subBtn {
  69. width: 231Px;
  70. height: 62Px;
  71. background: #198CFE;
  72. border-radius: 18Px;
  73. border: none;
  74. font-size: 22Px;
  75. font-weight: 600;
  76. color: #FFFFFF;
  77. line-height: 30Px;
  78. cursor: pointer;
  79. margin-top: 32Px;
  80. list-style: none outside none;
  81. text-decoration: none;
  82. }
  83. </style>
  84. <script type="text/javascript">
  85. function gotoLinlk() {
  86. console.log('点击')
  87. var agent = navigator.userAgent.toLowerCase();
  88. var isMac = function () { return /macintosh|mac os x/i.test(navigator.userAgent); }();
  89. if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
  90. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup32.exe');
  91. }
  92. if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
  93. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup64.exe');
  94. }
  95. if (isMac) {
  96. window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/googlechrome-mac.dmg');
  97. }
  98. }
  99. function getChromeVersion() {
  100. var arr = navigator.userAgent.split(' ');
  101. var chromeVersion = '';
  102. for (var i = 0; i < arr.length; i++) {
  103. if (/chrome/i.test(arr[i])) chromeVersion = arr[i];
  104. }
  105. if (chromeVersion) {
  106. return Number(chromeVersion.split('/')[1].split('.')[0]);
  107. } else {
  108. return false;
  109. }
  110. };
  111. function IsFF() {
  112. var sAgent = window.navigator.userAgent.toLowerCase();
  113. if (sAgent.indexOf("firefox") != -1) {
  114. return true;
  115. }
  116. return false;
  117. }
  118. function isChrome() {
  119. var isChromium = window.chrome;
  120. var winNav = window.navigator;
  121. var vendorName = winNav.vendor;
  122. var isOpera = typeof window.opr !== 'undefined';
  123. var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
  124. var isIOSChrome = winNav.userAgent.match('CriOS');
  125. return (
  126. isIOSChrome ||
  127. (isChromium !== null &&
  128. typeof isChromium !== 'undefined' &&
  129. vendorName === 'Google Inc.' &&
  130. isOpera === false &&
  131. isIEedge === false)
  132. );
  133. };
  134. function IEVersion() {
  135. var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  136. var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
  137. var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
  138. var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
  139. if (isIE) {
  140. var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
  141. reIE.test(userAgent);
  142. var fIEVersion = parseFloat(RegExp["$1"]);
  143. if (fIEVersion == 7) {
  144. return 7;
  145. } else if (fIEVersion == 8) {
  146. return 8;
  147. } else if (fIEVersion == 9) {
  148. return 9;
  149. } else if (fIEVersion == 10) {
  150. return 10;
  151. } else {
  152. return 6;//IE版本<=7
  153. }
  154. } else if (isEdge) {
  155. return 'edge';//edge
  156. } else if (isIE11) {
  157. return 11; //IE11
  158. } else {
  159. return -1;//不是ie浏览器
  160. }
  161. }
  162. (function (window) {
  163. if (!isChrome()) {
  164. // 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>");
  165. if (IEVersion() < 9 && IEVersion() != -1) {
  166. document.writeln(" <div class='textWrap'><h1>当前浏览器版本过低</h1><p class='subMsg'>为了保证良好的上课体验,推荐您使用谷歌浏览器</p> <button class='subBtn' onclick='gotoLinlk()'>下载谷歌浏览器</button>");
  167. document.execCommand("Stop");
  168. } else {
  169. 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>");
  170. document.execCommand("Stop");
  171. }
  172. } else {
  173. if (getChromeVersion() < 90) {
  174. 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>");
  175. document.execCommand("Stop");
  176. window.stop()
  177. console.log('Stop')
  178. }
  179. // if (IsFF()) {
  180. }
  181. })(window);
  182. </script>
  183. </head>
  184. <!-- 按钮 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png -->
  185. <!-- 背景 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png -->
  186. <body class="myBody">
  187. <div id="app"></div>
  188. <script type="module" src="/src/main.ts"></script>
  189. </body>
  190. </html>