colexiu-report-share.html 5.7 KB

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