colexiu.html 6.9 KB

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