Selaa lähdekoodia

Merge branch 'feature-1.8.7' into kt-dev

TIANYONG 1 vuosi sitten
vanhempi
commit
20e88fad0a

+ 8 - 8
dist/colexiu.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-64fa2641.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-6a06cf8f.js"></script>
 
   <meta charset="UTF-8" />
   <link rel="icon" type="image/svg+xml" href="./vite.svg" />
@@ -40,11 +40,11 @@
       },
     })
   </script>
-  <script type="module" crossorigin src="./js/colexiu-d84d8c05.js"></script>
-  <link rel="modulepreload" crossorigin href="./js/index-9f557e88.js">
-  <link rel="modulepreload" crossorigin href="./js/index-13911e80.js">
-  <link rel="modulepreload" crossorigin href="./js/index-9e36c5df.js">
-  <link rel="modulepreload" crossorigin href="./js/index-c1697edd.js">
+  <script type="module" crossorigin src="./js/colexiu-4ad36b94.js"></script>
+  <link rel="modulepreload" crossorigin href="./js/index-36c21154.js">
+  <link rel="modulepreload" crossorigin href="./js/index-c34f2749.js">
+  <link rel="modulepreload" crossorigin href="./js/index-eb907c89.js">
+  <link rel="modulepreload" crossorigin href="./js/index-2a98ea9a.js">
   <link rel="stylesheet" href="./css/index-5cdcded6.css">
   <link rel="stylesheet" href="./css/index-d42b0794.css">
   <link rel="stylesheet" href="./css/colexiu-62f31c4f.css">
@@ -57,8 +57,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-aa145978.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/colexiu-legacy-544c6868.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-8891b9b0.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/colexiu-legacy-296b9ce1.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 3 - 1
src/helpers/formateMusic.ts

@@ -742,7 +742,9 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 		let currentVoiceEntries: any[] = [];
 		// 多分轨,当前小节最大音符数量
 		let maxNoteNum = 0;
-		iterator.currentMeasure?.verticalMeasureList?.forEach((item: any) => maxNoteNum = Math.max(maxNoteNum, item?.staffEntries?.length || 0))
+		// iterator.currentMeasure?.verticalMeasureList?.forEach((item: any) => maxNoteNum = Math.max(maxNoteNum, item?.staffEntries?.length || 0))
+		maxNoteNum = iterator.currentMeasure?.verticalSourceStaffEntryContainers.length || 0
+		// console.log(iterator.currentMeasure.MeasureNumberXML,maxNoteNum,iterator.currentMeasure?.verticalSourceStaffEntryContainers.length)
 		// 单声部多声轨
 		if (state.multitrack > 0) {
 			currentVoiceEntries = [...iterator.CurrentVoiceEntries];

+ 4 - 3
src/page-instrument/evaluat-model/delay-check/index.tsx

@@ -67,14 +67,15 @@ export default defineComponent({
 		});
 
 		const initJson = async () => {
-
+			// console.log('开始加载')
 			// const bg = await import(`./json/bg.json`);
 			// const bg1 = await import(`./json/bg1.json`);
 			/* @vite-ignore */
-
 			data.bg = await import(`./json/bg_new.json`);
-			// data.bg = await getJson('bg_new.json');
+			// data.bg = getJson('bg_new.json');
 			data.jsonDone = true;
+			evaluatingData.jsonLoadDone = true;
+			// console.log('延迟检测资源加载完成')
 		}
 
 		// 调用'isWiredHeadsetOn'最小时间间隔,1秒

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/page-instrument/evaluat-model/delay-check/json/bg_new.json


+ 8 - 0
src/page-instrument/evaluat-model/index.module.less

@@ -94,4 +94,12 @@
         height: 72px;
         margin-right: 6px;
     }
+}
+
+.preJson {
+    width: 1px;
+    height: 1px;
+    visibility: hidden;
+    background: transparent;
+    opacity: 0;
 }

+ 7 - 0
src/page-instrument/evaluat-model/index.tsx

@@ -395,6 +395,13 @@ export default defineComponent({
           />
         )}
 
+        {/* 预加载延迟检测组建 */}
+        {/* {evaluatingData.preloadJson && !evaluatingData.jsonLoadDone && (
+            <div class={styles.preJson}>
+              <DelayCheck />
+            </div>
+        )} */}
+
         <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale"]} transition="van-scale" v-model:show={evaluatingData.earphoneMode}>
           <Earphone
             onClose={() => {

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

@@ -4,7 +4,7 @@ import styles from "./index.module.less";
 import iconBack from "./image/icon-back.svg";
 import Title from "./title";
 import { headImg } from "./image";
-import { Badge, Circle, Popover, Popup, showConfirmDialog } from "vant";
+import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast } from "vant";
 import Speed from "./speed";
 import { evaluatingData, handleStartEvaluat } from "/src/view/evaluating";
 import Settting from "./settting";
@@ -47,6 +47,12 @@ export const headTopData = reactive({
       // state.playIngSpeed = state.speed
     }
     if (value === "evaluating") {
+      // 如果延迟检测资源还在加载中,给出提示
+      if (!evaluatingData.jsonLoadDone) {
+        showToast('资源加载中,请稍后')
+        return
+      }
+
       // 如果是pc端, 评测模式暂不可用
       if (state.platform === IPlatform.PC) {
         showConfirmDialog({

+ 8 - 0
src/page-instrument/view-detail/index.module.less

@@ -151,4 +151,12 @@
             opacity: 0 !important;
         }
     }
+}
+
+.preJson {
+    width: 1px;
+    height: 1px;
+    visibility: hidden;
+    background: transparent;
+    opacity: 0;
 }

+ 12 - 1
src/page-instrument/view-detail/index.tsx

@@ -1,5 +1,5 @@
 import { Popup, Skeleton } from "vant";
-import { computed, defineComponent, nextTick, onBeforeMount, onBeforeUnmount, onMounted, reactive, Transition, watch, watchEffect } from "vue";
+import { computed, defineComponent, nextTick, onBeforeMount, onBeforeUnmount, onMounted, reactive, Transition, watch, watchEffect, defineAsyncComponent } from "vue";
 import { formateTimes } from "../../helpers/formateMusic";
 import Metronome, { metronomeData } from "../../helpers/metronome";
 import state, { EnumMusicRenderType, evaluatCreateMusicPlayer, handleSetSpeed, IAudioState, IPlatform, isRhythmicExercises, resetPlaybackToStart, togglePlay, getMusicDetail } from "/src/state";
@@ -33,6 +33,10 @@ import { initMidi } from "/src/helpers/midiPlay"
 import TheAudio from "/src/components/the-audio"
 import tickWav from "/src/assets/tick.wav";
 
+
+const DelayCheck = defineAsyncComponent(() =>
+  import('/src/page-instrument/evaluat-model/delay-check')
+)
 /**
  * 特殊教材分类id
  */
@@ -384,6 +388,13 @@ export default defineComponent({
 
         {/* {!detailData.isLoading && <TheAudio src={tickWav} />} */}
 
+        {/* 预加载延迟检测组建 */}
+        {!detailData.isLoading && !detailData.skeletonLoading && evaluatingData.preloadJson && !evaluatingData.jsonLoadDone && (
+            <div class={styles.preJson}>
+              <DelayCheck />
+            </div>
+        )}
+
         {/* 评测 */}
         {state.modeType === "evaluating" && (
           <>

+ 2 - 0
src/view/evaluating/index.tsx

@@ -104,6 +104,8 @@ export const evaluatingData = reactive({
 	accompanyErrorType: '',	
 	/** app播放结束状态,重新评测需要重置为 */
 	isAudioPlayEnd: false,
+	preloadJson: true, // 预加载延迟检测的资源
+	jsonLoadDone: false, // 延迟检测的动画dom加载完成
 });
 
 const sendOffsetTime = async (offsetTime: number) => {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
stats.html


+ 2 - 2
vite.config.ts

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

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä