index.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. </head>
  27. <style>
  28. body {
  29. background: #f1f5ff;
  30. width: 100%;
  31. }
  32. .bgImg {
  33. width: 456px;
  34. }
  35. .btnImg {
  36. width: 288px;
  37. position: absolute;
  38. left: 50%;
  39. margin-left: -144px;
  40. bottom: 31px;
  41. cursor: pointer;
  42. }
  43. .imgWrap {
  44. width: 456px;
  45. position: absolute;
  46. top: 141px;
  47. left: 50%;
  48. margin-left: -288px;
  49. }
  50. </style>
  51. <!-- 按钮 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png -->
  52. <!-- 背景 https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png -->
  53. <body class="myBody">
  54. <script type="text/javascript">
  55. function getChromeVersion() {
  56. var arr = navigator.userAgent.split(' ');
  57. var chromeVersion = '';
  58. for (let i = 0; i < arr.length; i++) {
  59. if (/chrome/i.test(arr[i])) chromeVersion = arr[i];
  60. }
  61. if (chromeVersion) {
  62. return Number(chromeVersion.split('/')[1].split('.')[0]);
  63. } else {
  64. return false;
  65. }
  66. };
  67. function IsFF() {
  68. var sAgent = window.navigator.userAgent.toLowerCase();
  69. if (sAgent.indexOf("firefox") != -1) {
  70. return true;
  71. }
  72. return false;
  73. }
  74. function isChrome() {
  75. var isChromium = window.chrome;
  76. var winNav = window.navigator;
  77. var vendorName = winNav.vendor;
  78. var isOpera = typeof window.opr !== 'undefined';
  79. var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
  80. var isIOSChrome = winNav.userAgent.match('CriOS');
  81. return (
  82. isIOSChrome ||
  83. (isChromium !== null &&
  84. typeof isChromium !== 'undefined' &&
  85. vendorName === 'Google Inc.' &&
  86. isOpera === false &&
  87. isIEedge === false)
  88. );
  89. };
  90. function IEVersion() {
  91. var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  92. var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
  93. var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
  94. var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
  95. if (isIE) {
  96. var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
  97. reIE.test(userAgent);
  98. var fIEVersion = parseFloat(RegExp["$1"]);
  99. if (fIEVersion == 7) {
  100. return 7;
  101. } else if (fIEVersion == 8) {
  102. return 8;
  103. } else if (fIEVersion == 9) {
  104. return 9;
  105. } else if (fIEVersion == 10) {
  106. return 10;
  107. } else {
  108. return 6;//IE版本<=7
  109. }
  110. } else if (isEdge) {
  111. return 'edge';//edge
  112. } else if (isIE11) {
  113. return 11; //IE11
  114. } else {
  115. return -1;//不是ie浏览器
  116. }
  117. }
  118. (function (window) {
  119. // if (IEVersion() != -1) {
  120. // document.writeln("<pre style='text-align:center;color:#fff;background-color:#0cc; height:100%;border:0;position:fixed;top:0;left:0;width:100%;z-index:1234'>" +
  121. // "<h2 style='padding-top:200px;margin:0'><strong>" + str + "<br/></strong></h2><h2>" +
  122. // str2 + "</h2>");
  123. // document.execCommand("Stop");
  124. // };
  125. if (!isChrome()) {
  126. console.log(1)
  127. 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>");
  128. document.execCommand("Stop");
  129. // if (IsFF()) {
  130. // window.stop()
  131. // } else {
  132. // document.execCommand("Stop");
  133. // }
  134. } else {
  135. if (getChromeVersion() < 90) {
  136. console.log(2)
  137. 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>");
  138. document.execCommand("Stop");
  139. }
  140. // if (IsFF()) {
  141. }
  142. })(window);
  143. </script>
  144. <div id="app"></div>
  145. <script type="module" src="/src/main.ts"></script>
  146. </body>
  147. </html>