music-sheet.html 6.8 KB

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