ソースを参照

feat: 单独的一行谱页面取消loading动画

TIANYONG 7 ヶ月 前
コミット
6d57d04de6
1 ファイル変更8 行追加2 行削除
  1. 8 2
      instrument.html

+ 8 - 2
instrument.html

@@ -8,6 +8,7 @@
   <title>AI学练</title>
   <link rel="icon" href="/favicon.ico?v=1" />
   <script src="/flexible.js" charset="UTF-8"></script>
+  <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
   <style>
     #loading {
       position: fixed;
@@ -22,13 +23,18 @@
     }
   </style>
   <script>
+    // VConsole will be exported to `window.VConsole` by default.
+    var vConsole = new window.VConsole();
+  </script>
+  <script>
     function _postMessage(data, callback) {
       const instance = window.COLEXIU || (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.COLEXIU)
       if (instance) {
         instance.postMessage(JSON.stringify(data))
       }
     }
-    if (!location.href.includes('iscurseplay=play') && !location.href.includes('isPreView=true')) {
+    // APP的全屏loading动画
+    if (!location.href.includes('iscurseplay=play') && !location.href.includes('isPreView=true') && !location.href.includes("simple-detail")) {
       _postMessage({
         api: 'cloudLoading',
         content: {
@@ -45,7 +51,7 @@
   <img id="loading" class="show" src="/loading.svg" alt="loading" />
   <script>
     // 处理课堂乐器老师端打开听音练习时去掉加载动画
-    if (location.href.indexOf('view-figner') >= 0 && location.href.indexOf('platform=pc') >= 0 && location.href.indexOf('linkSource=class') < 0) {
+    if (location.href.indexOf('view-figner') >= 0 && location.href.indexOf('platform=pc') >= 0 && location.href.indexOf('linkSource=class') < 0 && !location.href.includes("simple-detail")) {
       var _loading = document.getElementById("loading");
       _loading && document.body.removeChild(_loading);
     }