|
@@ -1,191 +1,59 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html lang="ZH-cn">
|
|
|
- <head>
|
|
|
- <meta charset="UTF-8" />
|
|
|
- <link rel="icon" href="/favicon.ico" />
|
|
|
- <meta name="description" content="管乐团APP,器乐学习的不二选择" />
|
|
|
- <title>管乐团云教练</title>
|
|
|
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
- <link href="/vant.css" rel="stylesheet">
|
|
|
|
|
|
- <script>
|
|
|
- if (window.navigator && navigator.serviceWorker) {
|
|
|
- navigator.serviceWorker.getRegistrations().then(function (registrations) {
|
|
|
- for (let registration of registrations) {
|
|
|
- registration.unregister()
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- function getBroswer() {
|
|
|
- var Sys = {}
|
|
|
- var ua = navigator.userAgent.toLowerCase()
|
|
|
- var s
|
|
|
- ;(s = ua.match(/edge\/([\d.]+)/))
|
|
|
- ? (Sys.edge = s[1])
|
|
|
- : (s = ua.match(/rv:([\d.]+)\) like gecko/))
|
|
|
- ? (Sys.ie = s[1])
|
|
|
- : (s = ua.match(/msie ([\d.]+)/))
|
|
|
- ? (Sys.ie = s[1])
|
|
|
- : (s = ua.match(/firefox\/([\d.]+)/))
|
|
|
- ? (Sys.firefox = s[1])
|
|
|
- : (s = ua.match(/chrome\/([\d.]+)/))
|
|
|
- ? (Sys.chrome = s[1])
|
|
|
- : (s = ua.match(/opera.([\d.]+)/))
|
|
|
- ? (Sys.opera = s[1])
|
|
|
- : (s = ua.match(/version\/([\d.]+).*safari/))
|
|
|
- ? (Sys.safari = s[1])
|
|
|
- : 0
|
|
|
-
|
|
|
- if (Sys.edge) return { broswer: 'Edge', version: Sys.edge }
|
|
|
- if (Sys.ie) return { broswer: 'IE', version: Sys.ie }
|
|
|
- if (Sys.firefox) return { broswer: 'Firefox', version: Sys.firefox }
|
|
|
- if (Sys.chrome) return { broswer: 'Chrome', version: Sys.chrome }
|
|
|
- if (Sys.opera) return { broswer: 'Opera', version: Sys.opera }
|
|
|
- if (Sys.safari) return { broswer: 'Safari', version: Sys.safari }
|
|
|
-
|
|
|
- return { broswer: '', version: '0' }
|
|
|
- }
|
|
|
- var broswer = getBroswer()
|
|
|
- window.addEventListener('DOMContentLoaded', function () {
|
|
|
- if (broswer.broswer === 'Chrome' && parseFloat(broswer.version) <= 50) {
|
|
|
- document.getElementById('update').className = 'show'
|
|
|
- document.getElementById('loading').className = ''
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8" />
|
|
|
+ <link rel="icon" href="/favicon.ico" />
|
|
|
+ <title>管乐团云教练</title>
|
|
|
+ <meta name="description" content="管乐团APP,器乐学习的不二选择" />
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
+ <script src="/helpers/lottie.min.js"></script>
|
|
|
+ <link href="/vant.css" rel="stylesheet">
|
|
|
+
|
|
|
+ <script>
|
|
|
+ if (window.navigator && navigator.serviceWorker) {
|
|
|
+ navigator.serviceWorker.getRegistrations().then(function (registrations) {
|
|
|
+ for (let registration of registrations) {
|
|
|
+ registration.unregister()
|
|
|
}
|
|
|
})
|
|
|
- // console.log("broswer:"+abc.broswer+" version:"+abc.version);
|
|
|
- </script>
|
|
|
- <style>
|
|
|
- #loading {
|
|
|
- position: fixed;
|
|
|
- left: 50%;
|
|
|
- top: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- visibility: hidden;
|
|
|
- opacity: 0;
|
|
|
- transition: opacity 0.3s;
|
|
|
- text-align: center;
|
|
|
- color: #1e293b;
|
|
|
- }
|
|
|
- #loading > div {
|
|
|
- display: none;
|
|
|
- font-size: 24px;
|
|
|
- }
|
|
|
- #loading a {
|
|
|
- color: #01c1b5;
|
|
|
- text-decoration: none;
|
|
|
- }
|
|
|
- #loading.show {
|
|
|
- visibility: visible;
|
|
|
- opacity: 1;
|
|
|
- }
|
|
|
- #cnzz_stat_icon_1279349593 {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- #update {
|
|
|
- margin-top: 100px;
|
|
|
- opacity: 0;
|
|
|
- visibility: hidden;
|
|
|
- transform: opacity 0.3s;
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- }
|
|
|
- #update.show {
|
|
|
- opacity: 1;
|
|
|
- visibility: visible;
|
|
|
- }
|
|
|
- #update img {
|
|
|
- display: block;
|
|
|
- margin: auto;
|
|
|
- width: 150px;
|
|
|
- height: 150px;
|
|
|
- }
|
|
|
- #update span {
|
|
|
- display: block;
|
|
|
- max-width: 90%;
|
|
|
- margin: auto;
|
|
|
- margin-top: 30px;
|
|
|
- color: rgba(0, 0, 0, 0.65);
|
|
|
- line-height: 1.8;
|
|
|
- }
|
|
|
- </style>
|
|
|
- </head>
|
|
|
- <body>
|
|
|
- <div id="app"></div>
|
|
|
- <div id="loading" class="show">
|
|
|
- <img src="/loading.svg" alt="loading" />
|
|
|
- <div>请求时间过长,请检查网络环境 <a href="javascript:;" onclick="_back()">点击返回</a></div>
|
|
|
- </div>
|
|
|
- <script>
|
|
|
- const _onlyPostmessage = (function () {
|
|
|
- 'use strict'
|
|
|
- const getRandomKey = () => {
|
|
|
- return '' + new Date().getTime() + Math.floor(Math.random() * 1000000)
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @param instanceKey 实例函数key
|
|
|
- */
|
|
|
- var onlyPostmessage = (instanceKey) => {
|
|
|
- var _a, _b
|
|
|
- const win = window;
|
|
|
- win.originalPostMessage = win.originalPostMessage || window.postMessage
|
|
|
- const instance = window.ORCHESTRA || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.ORCHESTRA)
|
|
|
- return function (data) {
|
|
|
- if (instance) {
|
|
|
- const uuid = getRandomKey()
|
|
|
- data.content = data.content ? Object.assign(Object.assign({}, data.content), { uuid }) : { uuid }
|
|
|
- console.log('index-send:', JSON.stringify(data))
|
|
|
- instance.postMessage(JSON.stringify(data))
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return onlyPostmessage
|
|
|
- })()
|
|
|
-
|
|
|
- window._setupMessage = _onlyPostmessage('ORCHESTRA')
|
|
|
- if (location.origin.indexOf('192.168') > -1 && location.href.indexOf('&acc=1') === -1 && !document.hidden) {
|
|
|
- // window._setupMessage({
|
|
|
- // api: 'openAccompanyWebView',
|
|
|
- // content: {
|
|
|
- // url: location.origin + location.pathname + '?id=50970&acc=1',
|
|
|
- // orientation: 0,
|
|
|
- // isHideTitle: true,
|
|
|
- // statusBarTextColor: false,
|
|
|
- // isOpenLight: true,
|
|
|
- // },
|
|
|
- // })
|
|
|
- }
|
|
|
-
|
|
|
- ;(function () {
|
|
|
- window.isLoading = true
|
|
|
- const instance = window.ORCHESTRA || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.ORCHESTRA)
|
|
|
- window._setupMessage({
|
|
|
- api: 'cloudLoading',
|
|
|
- content: {
|
|
|
- show: true,
|
|
|
- type: 'fullscreen',
|
|
|
- },
|
|
|
- })
|
|
|
- try {
|
|
|
- setTimeout(() => {
|
|
|
- var tips = document.querySelector('#loading div')
|
|
|
- if (tips) {
|
|
|
- tips.style.display = 'block'
|
|
|
- }
|
|
|
- }, 10 * 1000)
|
|
|
- } catch (error) {}
|
|
|
- })()
|
|
|
-
|
|
|
- function _back() {
|
|
|
- window._setupMessage({
|
|
|
- api: 'back',
|
|
|
- })
|
|
|
- }
|
|
|
- this.globalThis || (this.globalThis = this)
|
|
|
- </script>
|
|
|
- <script type="module" src="/src/subpages/colexiu/main.ts"></script>
|
|
|
- </body>
|
|
|
-</html>
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <style>
|
|
|
+ #lottieWeb {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 100;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ pointer-events: none;
|
|
|
+ transition: opacity .3s;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div id="app"></div>
|
|
|
+ <div id="lottieWeb"></div>
|
|
|
+ <script>
|
|
|
+ lottie.loadAnimation({
|
|
|
+ container: document.getElementById('lottieWeb'),
|
|
|
+ renderer: 'svg',
|
|
|
+ width: '30px',
|
|
|
+ height: '30px',
|
|
|
+ loop: true,
|
|
|
+ autoplay: true,
|
|
|
+ path: '/loading.json'
|
|
|
+ });
|
|
|
+ window.addEventListener('load', function () {
|
|
|
+ const loadingEle = document.getElementById('lottieWeb')
|
|
|
+ loadingEle.style.opacity = '0'
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingEle.style.display = 'none'
|
|
|
+ }, 1000)
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+ <script type="module" src="/src/subpages/colexiu/main.ts"></script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|