colxiu-website.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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="description" content="酷乐秀APP,器乐学习的不二选择">
  7. <title>酷乐秀</title>
  8. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  9. <!-- <link rel="preconnect" href="https://fonts.loli.net"> -->
  10. <!-- <link href="https://fonts.loli.net/css2?family=Roboto:wght@700&display=swap" rel="stylesheet"> -->
  11. <script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1279349593'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D1279349593%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
  12. <script type="text/javascript">
  13. // if (window.location.hostname !== 'mstuonline.dayaedu.com') {
  14. // document.write(unescape("%3Cscript%20src%3D%22https%3A//cdn.jsdelivr.net/npm/eruda@2.4.1/eruda.min.js%22%3E%3C/script%3E"))
  15. // }
  16. if (window._czc) {
  17. window._czc.push(["_setAutoPageView", false])
  18. }
  19. </script>
  20. <script>
  21. // if (window.location.hostname !== 'mstuonline.dayaedu.com') {
  22. // eruda.init()
  23. // }
  24. if(window.navigator && navigator.serviceWorker) {
  25. navigator.serviceWorker.getRegistrations()
  26. .then(function(registrations) {
  27. for(let registration of registrations) {
  28. registration.unregister();
  29. }
  30. });
  31. }
  32. function getBroswer(){
  33. var Sys = {};
  34. var ua = navigator.userAgent.toLowerCase();
  35. var s;
  36. (s = ua.match(/edge\/([\d.]+)/)) ? Sys.edge = s[1] :
  37. (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
  38. (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
  39. (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
  40. (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
  41. (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
  42. (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
  43. if (Sys.edge) return { broswer : "Edge", version : Sys.edge };
  44. if (Sys.ie) return { broswer : "IE", version : Sys.ie };
  45. if (Sys.firefox) return { broswer : "Firefox", version : Sys.firefox };
  46. if (Sys.chrome) return { broswer : "Chrome", version : Sys.chrome };
  47. if (Sys.opera) return { broswer : "Opera", version : Sys.opera };
  48. if (Sys.safari) return { broswer : "Safari", version : Sys.safari };
  49. return { broswer : "", version : "0" };
  50. }
  51. var broswer = getBroswer();
  52. window.addEventListener('DOMContentLoaded', function() {
  53. if (broswer.broswer === 'Chrome' && parseFloat(broswer.version) <= 50) {
  54. document.getElementById('update').className = 'show'
  55. document.getElementById('loading').className = ''
  56. }
  57. })
  58. // console.log("broswer:"+abc.broswer+" version:"+abc.version);
  59. </script>
  60. <title>酷乐秀学院</title>
  61. <style>
  62. #loading{
  63. position: fixed;
  64. left: 50%;
  65. top: 50%;
  66. transform: translate(-50%, -50%);
  67. visibility: hidden;
  68. opacity: 0;
  69. transition: opacity .3s;
  70. text-align: center;
  71. color: #1e293b;
  72. }
  73. #loading > div{
  74. display: none;
  75. font-size: 24px;
  76. }
  77. #loading a{
  78. color: #01c1b5;
  79. text-decoration: none;
  80. }
  81. #loading.show {
  82. visibility: visible;
  83. opacity: 1;
  84. }
  85. #cnzz_stat_icon_1279349593{
  86. display: none;
  87. }
  88. #update{
  89. margin-top: 100px;
  90. opacity: 0;
  91. visibility: hidden;
  92. transform: opacity .3s;
  93. position: absolute;
  94. top: 0;
  95. left: 50%;
  96. transform: translateX(-50%);
  97. }
  98. #update.show{
  99. opacity: 1;
  100. visibility: visible;
  101. }
  102. #update img{
  103. display: block;
  104. margin: auto;
  105. width: 150px;
  106. height: 150px;
  107. }
  108. #update span{
  109. display: block;
  110. max-width: 90%;
  111. margin: auto;
  112. margin-top: 30px;
  113. color: rgba(0, 0, 0, .65);
  114. line-height: 1.8;
  115. }
  116. </style>
  117. </head>
  118. <body>
  119. <div id="app"></div>
  120. <div id="loading" class="show">
  121. <img src="/loading.svg" alt="loading"/>
  122. <div>请求时间过长,请检查网络环境 <a href="javascript:;" onclick="_back()">点击返回</a></div>
  123. </div>
  124. <script>
  125. const _onlyPostmessage = (function () {
  126. 'use strict';
  127. const getRandomKey = () => {
  128. return '' + new Date().getTime() + Math.floor(Math.random() * 1000000);
  129. };
  130. /**
  131. * @param instanceKey 实例函数key
  132. */
  133. var onlyPostmessage = (instanceKey) => {
  134. var _a, _b;
  135. const win = window;
  136. win.originalPostMessage = win.originalPostMessage || window.postMessage;
  137. const instance = win[instanceKey] || ((_b = (_a = win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b[instanceKey]);
  138. return function (data) {
  139. if (instance) {
  140. const uuid = getRandomKey();
  141. data.content = data.content ? Object.assign(Object.assign({}, data.content), { uuid }) : { uuid };
  142. instance.postMessage(JSON.stringify(data));
  143. console.log('send:', JSON.stringify(data));
  144. }
  145. };
  146. };
  147. return onlyPostmessage;
  148. })();
  149. window._setupMessage = _onlyPostmessage('COLEXIU');
  150. ;(function() {
  151. try {
  152. setTimeout(() => {
  153. var tips = document.querySelector('#loading div')
  154. if (tips) {
  155. tips.style.display = 'block'
  156. }
  157. }, 10 * 1000)
  158. } catch (error) {}
  159. })()
  160. function _back() {
  161. window._setupMessage({
  162. api: 'back',
  163. })
  164. }
  165. </script>
  166. <script type="module" src="/src/subpages/colexiu-website/main.ts"></script>
  167. </body>
  168. </html>