瀏覽代碼

Merge branch 'feature-tianyong-newVersion' into feature-wxl-newVersion

lex 11 月之前
父節點
當前提交
853aa0f0dc

+ 1 - 1
.gitignore

@@ -21,4 +21,4 @@ dist-ssr
 *.ntvs*
 *.njsproj
 *.sln
-*.sw?
+*.sw?

+ 9 - 10
dist/colexiu.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-1a2e4f1c.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-7c3d5f60.js"></script>
 
   <meta charset="UTF-8" />
   <link rel="icon" type="image/svg+xml" href="./vite.svg" />
@@ -40,13 +40,12 @@
       },
     })
   </script>
-  <script type="module" crossorigin src="./js/colexiu-4a63d64c.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-c987494a.js">
-  <link rel="modulepreload" crossorigin href="./js/index-d8f93bbd.js">
-  <link rel="modulepreload" crossorigin href="./js/index-666ce298.js">
-  <link rel="stylesheet" href="./css/index-33f3c513.css">
-  <link rel="stylesheet" href="./css/index-d42b0794.css">
-  <link rel="stylesheet" href="./css/colexiu-62f31c4f.css">
+  <script type="module" crossorigin src="./js/colexiu-817dd032.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-763e8b6a.js">
+  <link rel="modulepreload" crossorigin href="./js/index-624d1810.js">
+  <link rel="modulepreload" crossorigin href="./js/index-d6925e45.js">
+  <link rel="stylesheet" href="./css/index-ccf6117c.css">
+  <link rel="stylesheet" href="./css/colexiu-e8b419b5.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 </head>
@@ -56,8 +55,8 @@
   <img id="loading" class="show" src="./loading.svg" alt="loading" />
   
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b3b6467d.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/colexiu-legacy-9355aa1b.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-95755a14.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/colexiu-legacy-587fa4ae.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

二進制
dist/gif/refresh_anim-de363185.gif


+ 8 - 11
dist/index.html

@@ -2,7 +2,7 @@
 <html lang="ZH-cn">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-1a2e4f1c.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-7c3d5f60.js"></script>
 
   <meta charset="UTF-8">
   <link rel="icon" href="./favicon.ico" />
@@ -75,16 +75,13 @@
       }
     })
   </script>
-  <script type="module" crossorigin src="./js/gym-65bdffe8.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-c987494a.js">
-  <link rel="modulepreload" crossorigin href="./js/index-948cb66f.js">
-  <link rel="modulepreload" crossorigin href="./js/index-27021a09.js">
-  <link rel="modulepreload" crossorigin href="./js/index-d8f93bbd.js">
-  <link rel="modulepreload" crossorigin href="./js/index-666ce298.js">
+  <script type="module" crossorigin src="./js/gym-a1294940.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-763e8b6a.js">
+  <link rel="modulepreload" crossorigin href="./js/index-624d1810.js">
+  <link rel="modulepreload" crossorigin href="./js/index-1dc5c539.js">
   <link rel="modulepreload" crossorigin href="./js/plyr.min-c8c2777b.js">
-  <link rel="stylesheet" href="./css/index-33f3c513.css">
+  <link rel="stylesheet" href="./css/index-ccf6117c.css">
   <link rel="stylesheet" href="./css/index-85f95688.css">
-  <link rel="stylesheet" href="./css/index-d42b0794.css">
   <link rel="stylesheet" href="./css/plyr-ad8ef5ae.css">
   <link rel="stylesheet" href="./css/index-171cd132.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
@@ -100,8 +97,8 @@
   <img id="loading" class="show" src="./loading.svg" alt="loading" />
   
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b3b6467d.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/gym-legacy-d67a9763.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-95755a14.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/gym-legacy-9c45ea39.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 15 - 12
dist/instrument.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-1a2e4f1c.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-7c3d5f60.js"></script>
 
   <meta charset="UTF-8" />
   <meta name="viewport"
@@ -30,7 +30,8 @@
         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: {
@@ -40,13 +41,10 @@
       })
     }
   </script>
-  <script type="module" crossorigin src="./js/instrument-ff82a3ab.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-c987494a.js">
-  <link rel="modulepreload" crossorigin href="./js/index-666ce298.js">
-  <link rel="modulepreload" crossorigin href="./js/index-948cb66f.js">
-  <link rel="stylesheet" href="./css/index-33f3c513.css">
-  <link rel="stylesheet" href="./css/index-d42b0794.css">
-  <link rel="stylesheet" href="./css/instrument-d78850b6.css">
+  <script type="module" crossorigin src="./js/instrument-e3875fa3.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-763e8b6a.js">
+  <link rel="stylesheet" href="./css/index-ccf6117c.css">
+  <link rel="stylesheet" href="./css/instrument-f3d1af9e.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 </head>
@@ -56,16 +54,21 @@
   <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);
     }
   </script>
 
   
+  <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
+  <script>
+    // VConsole will be exported to `window.VConsole` by default.
+    // var vConsole = new window.VConsole();
+  </script>
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b3b6467d.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-6acd9b82.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-95755a14.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-4b1cdc45.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 10 - 11
dist/orchestra.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-1a2e4f1c.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-7c3d5f60.js"></script>
 
   <meta charset="UTF-8" />
   <!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
@@ -41,15 +41,14 @@
       transition: opacity .3s;
     }
   </style>
-  <script type="module" crossorigin src="./js/orchestra-9b200011.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-c987494a.js">
-  <link rel="modulepreload" crossorigin href="./js/index-27021a09.js">
-  <link rel="modulepreload" crossorigin href="./js/index-d8f93bbd.js">
-  <link rel="modulepreload" crossorigin href="./js/index-666ce298.js">
-  <link rel="stylesheet" href="./css/index-33f3c513.css">
+  <script type="module" crossorigin src="./js/orchestra-fb7429c2.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-763e8b6a.js">
+  <link rel="modulepreload" crossorigin href="./js/index-624d1810.js">
+  <link rel="modulepreload" crossorigin href="./js/index-d6925e45.js">
+  <link rel="modulepreload" crossorigin href="./js/index-1dc5c539.js">
+  <link rel="stylesheet" href="./css/index-ccf6117c.css">
   <link rel="stylesheet" href="./css/index-85f95688.css">
-  <link rel="stylesheet" href="./css/index-d42b0794.css">
-  <link rel="stylesheet" href="./css/orchestra-8bc1a9c0.css">
+  <link rel="stylesheet" href="./css/orchestra-8e05e751.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 </head>
@@ -70,8 +69,8 @@
   </script>
   
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b3b6467d.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/orchestra-legacy-4ed40420.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-95755a14.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/orchestra-legacy-56a35f49.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 6 - 6
dist/report-share.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-1a2e4f1c.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-7c3d5f60.js"></script>
 
   <meta charset="UTF-8" />
   <!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
@@ -25,10 +25,10 @@
       transition: opacity .3s;
     }
   </style>
-  <script type="module" crossorigin src="./js/report-share-ef089666.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-c987494a.js">
+  <script type="module" crossorigin src="./js/report-share-ad36c120.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-763e8b6a.js">
   <link rel="modulepreload" crossorigin href="./js/plyr.min-c8c2777b.js">
-  <link rel="stylesheet" href="./css/index-33f3c513.css">
+  <link rel="stylesheet" href="./css/index-ccf6117c.css">
   <link rel="stylesheet" href="./css/plyr-ad8ef5ae.css">
   <link rel="stylesheet" href="./css/report-share-0f4c3151.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
@@ -51,8 +51,8 @@
   </script>
   
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-b3b6467d.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/report-share-legacy-1420c584.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-95755a14.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/report-share-legacy-7001a7f7.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 6 - 2
src/page-instrument/evaluat-model/index.tsx

@@ -1,4 +1,4 @@
-import { Transition, defineComponent, onMounted, reactive, watch, defineAsyncComponent } from "vue";
+import { Transition, defineComponent, onMounted, reactive, watch, defineAsyncComponent, computed } from "vue";
 import { connectWebsocket, evaluatingData, handleEndBegin, handleStartBegin, handleStartEvaluat, handleViewReport, startCheckDelay, checkUseEarphone, handleCancelEvaluat } from "/src/view/evaluating";
 import Earphone from "./earphone";
 import styles from "./index.module.less";
@@ -404,6 +404,10 @@ export default defineComponent({
       handleEvaluatResult("tryagain");
     };
 
+    const earPhonePopShow = computed(() => {
+			return evaluatingData.earphoneMode && state.audioDone && !state.hasDriverPop;
+		});
+
     onMounted(async () => {
       // 如果打开了延迟检测开关,需要先发送开始检测的消息
       if (state.setting.soundEffect) {
@@ -454,7 +458,7 @@ export default defineComponent({
         {
           evaluatingData.isBeginMask && <div class={styles.beginMask}></div>
         }
-        <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={evaluatingData.earphoneMode}>
+        <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={earPhonePopShow.value}>
           <Earphone
             earphoneType={evaluatingData.earPhoneType}
             onClose={() => {

+ 1 - 1
src/page-instrument/header-top/index.tsx

@@ -80,7 +80,7 @@ export const headTopData = reactive({
       state.playIngSpeed = state.originSpeed;
       handleStartEvaluat();
       // 开发模式,把此处打开
-      state.modeType = "evaluating";
+      //state.modeType = "evaluating";
       // evaluatingData.rendered = true;
       // evaluatingData.soundEffectMode = true;
     } else if (value === "follow") {

+ 1 - 0
src/page-instrument/header-top/speed/index.module.less

@@ -93,6 +93,7 @@
                             background: #94ACC4;
                             box-shadow: inset 0px 2px 3px 0px #647F98;
                             .van-slider__bar{
+                                max-width: 100%;
                                 background: linear-gradient( 270deg, #7ADEFF 0%, #29A9FF 100%);
                                 box-shadow: inset 1px 0px 5px 0px rgba(150,254,255,0.79);
                                 border: 1px solid #4A91D4;

+ 6 - 2
src/page-instrument/header-top/speed/index.tsx

@@ -12,11 +12,15 @@ export default defineComponent({
 		const speed = ref(state.speed);
 
 		const minusSpeed = () => {
-			speed.value = Math.max(speed.value - 1, 45);
+			let canSpeed = Math.max(speed.value - 1, 45);
+			canSpeed = Math.min(canSpeed, 270);
+			speed.value = canSpeed;
 		};
 
 		const plusSpeed = () => {
-			speed.value = Math.min(speed.value + 1, 270);
+			let canSpeed = Math.min(speed.value + 1, 270);
+			canSpeed = Math.max(canSpeed, 45);
+			speed.value = canSpeed;
 		};
 		watch(
 			() => speed.value,

+ 7 - 2
src/state.ts

@@ -509,6 +509,8 @@ const state = reactive({
   originAudioPlayRate: 1,  
   /** 开始播放时,记录的mp3播放倍率,用户当前设置的速度/当前小节的速度 */
   basePlayRate: 1,
+  /** 引导页显示状态 */
+  hasDriverPop: false,
 });
 const browserInfo = browser();
 let offset_duration = 0;
@@ -764,7 +766,8 @@ export const togglePlay = async (playState?: "play" | "paused", sourceType?: str
     closeTick()
   }
   // 设置为开始播放时, 如果需要节拍,先播放节拍器   只有在当前播放时间不为0的时候开启节拍器
-  if (state.playState === "play" && getAudioCurrentTime() === 0 && ((state.playType === "play" && state.needTick) || (state.playType === "sing" && state.needSingTick))) {
+  const isOneMeasureNumberXML = state.section.length === 2 && state.section[0].MeasureNumberXML === 2 //当是选段模式 并且开始小节是第二小节 就不播节拍器(这种情况有预选小节,currentTime是0)
+  if (state.playState === "play" && getAudioCurrentTime() === 0 && !isOneMeasureNumberXML && ((state.playType === "play" && state.needTick) || (state.playType === "sing" && state.needSingTick))) {
     // 如果是系统节拍器 等系统节拍器播完了再播,如果是mp3节拍器 直接播
     if ((state.playType === "play" && !state.isOpenMetronome) || (state.playType === "sing" && !state.isSingOpenMetronome)) {
       const tickend = await handleStartTick();
@@ -951,7 +954,7 @@ export const gotoNext = (note: any, skipNote?: boolean) => {
   let prev = state.activeNoteIndex;
   state.activeNoteIndex = num;
   state.activeMeasureIndex = note.MeasureNumberXML;
-
+  dynamicShowPlaySpeed(state.activeNoteIndex);
   if (prev && num - prev === 1) {
     // console.log('跳转音符',11111,osmd.cursor)
     // if (!note.id && note.multipleRestMeasures === 0) {
@@ -1221,6 +1224,7 @@ export const handleRessetState = () => {
   // 切换模式,清除选段
   clearSelection();
   skipNotePlay(0, true);
+  resetBaseRate();
   // midi 重置播放进度
   if (state.isAppPlay) {
     audioData.progress = 0;
@@ -1757,6 +1761,7 @@ watch(
 
 /** 刷新谱面 */
 export const refreshMusicSvg = () => {
+  resetBaseRate();
   state.loadingText = '正在加载中,请稍等…'
   // 销毁旋律线
   destroySmoothAnimation()

File diff suppressed because it is too large
+ 0 - 0
stats.html


+ 1 - 1
vite.config.ts

@@ -77,7 +77,7 @@ export default defineConfig({
         // target: "https://test.lexiaoya.cn",
         // target: "https://kt.colexiu.com",
         // target: "https://dev.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
-        target: "https://test.kt.colexiu.com",
+        target: "https://dev.kt.colexiu.com",
         //target: "https://mec.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),

Some files were not shown because too many files changed in this diff