Browse Source

Merge branch 'klx-online' into feature-patch

TIANYONG 4 tuần trước cách đây
mục cha
commit
7fa8685743

+ 3 - 3
dist/instrument.html

@@ -41,7 +41,7 @@
       })
     }
   </script>
-  <script type="module" crossorigin src="./js/instrument-b080b24f.js"></script>
+  <script type="module" crossorigin src="./js/instrument-72f6448e.js"></script>
   <link rel="stylesheet" href="./css/instrument-f8ff6f88.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>
@@ -65,8 +65,8 @@
     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-7ea27e1e.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-e8b5f1a0.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-1f76d399.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-2255ea58.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-00f25cbc.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-33857dda.js


+ 1 - 1
dist/js/index-093b25e6.js → dist/js/index-83db9fc9.js

@@ -1 +1 @@
-import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-b080b24f.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-72f6448e.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-96d92f6a.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-legacy-28ae8d27.js


+ 1 - 1
dist/js/index-legacy-e7787a11.js → dist/js/index-legacy-a421ccd8.js

@@ -1 +1 @@
-System.register(["./instrument-legacy-e8b5f1a0.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+System.register(["./instrument-legacy-2255ea58.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-legacy-c393d689.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/index-legacy-fd17551f.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/instrument-72f6448e.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/instrument-legacy-2255ea58.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/modeView-2c0bf47b.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/modeView-legacy-c2c20580.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/polyfills-legacy-1f76d399.js


+ 38 - 1
src/constant/instruments.ts

@@ -276,4 +276,41 @@ export const sortMusical = (name: string, index: number) => {
 		break;
 	}
 	return sortId
-  }
+  }
+
+export const fixInstrumentNameCode = (trackId: string | number) => {
+	let code: any;
+	const trackName = instruments[trackId] || ''
+	if (trackName.includes('长笛')) {
+		code = 2
+	} else if (trackName.includes('单簧管')) {
+		code = 4
+	} else if (trackName.includes('萨克斯')) {
+		code = 5
+	} else if (trackName.includes('小号')) {
+		code = 12
+	} else if (trackName.includes('圆号')) {
+		code = 13
+	} else if (trackName.includes('长号')) {
+		code = 14
+	} else if (trackName.includes('上低音号')) {
+		code = 15
+	} else if (trackName.includes('大号')) {
+		code = 17
+	} else if (trackName.includes('德式竖笛')) {
+		code = 'piccolo'
+	} else if (trackName.includes('英式竖笛')) {
+		code = 'baroque-recorder'
+	} else if (trackName.includes('葫芦丝')) {
+		code = 'hulusi-flute'
+	} else if (trackName.includes('排箫')) {
+		code = 'pan-flute'
+	} else if (trackName.includes('高音陶笛')) {
+		code = 'whistling'
+	} else if (trackName.includes('陶笛')) {
+		code = 'ocarina'
+	} else if (trackName.includes('口风琴')) {
+		code = 'melodica'
+	}
+	return code;
+}

+ 22 - 2
src/state.ts

@@ -24,6 +24,7 @@ import { api_lessonTrainingTrainingStudentDetail } from "/src/page-instrument/ap
 import { undoData, moveData } from "/src/view/plugins/move-music-score"
 import { HANDLE_WORK_ADD } from "/src/page-instrument/custom-plugins/work-index";
 import { speedBeatTo, unitImgs } from "/src/helpers/beatConfig"
+import { fixInstrumentNameCode } from "/src/constant/instruments";
 
 const query: any = getQuery();
 
@@ -1834,7 +1835,10 @@ const setState = (data: any, index: number) => {
   if (state.isSimplePage) {
     state.isCombineRender = false;
   }
-  setCustom(state.isCombineRender ? data.musicSheetSoundList?.length : 0);
+  // 多分轨合并显示的曲子,有可能只有一个原音文件,minCombineNum的最小值至少为2
+  const minCombineNum = data.musicSheetSoundList?.length ? Math.max(data.musicSheetSoundList?.length, 2) : 2;
+  setCustom(state.isCombineRender ? minCombineNum : 0);
+  // setCustom(state.isCombineRender ? data.musicSheetSoundList?.length : 0);
   // 解析扩展字段
   if (data.extConfigJson) {
     try {
@@ -1903,7 +1907,22 @@ const setState = (data: any, index: number) => {
    * 获取指法code
    */
   // const code = state.isConcert ? matchVoicePart(state.trackId, "CONCERT") : matchVoicePart(state.musicalCodeId, "SINGLE");
-  const code = matchVoicePart(state.trackId, "CONCERT")
+
+  // 如果是midi的曲子,midi的曲子没有musicSheetSoundList原音列表,指法需要通过musicalInstruments字段判断
+  if (data.musicSheetType === "SINGLE" && data.playMode === 'MIDI' && data.musicalInstruments?.length) {
+    const currentInstrumentId = query.instrumentId || storeData.user?.instrumentId;
+    let midiTrackId = null
+    if (currentInstrumentId) {
+      midiTrackId = data.musicalInstruments.find((item: any) => item.id == currentInstrumentId)?.code?.split(',')?.[0]
+    } else {
+      midiTrackId = data.musicalInstruments[0]?.code?.split(',')?.[0]
+    }
+    state.trackId = midiTrackId || state.trackId
+  }  
+  let code = matchVoicePart(state.trackId, "CONCERT")
+  if (code == 1 || !code) {
+    code = fixInstrumentNameCode(state.trackId)
+  }
   state.fingeringInfo = subjectFingering(code);
   console.log("🚀 ~ state.fingeringInfo:", code, state.fingeringInfo, state.trackId, state.track);
   state.musicalCodeId = state.fingeringInfo?.id || 0
@@ -2383,6 +2402,7 @@ export const checkMoveNoSave = async () => {
 
 /** 刷新谱面 */
 export const refreshMusicSvg = () => {
+  (window as any).DYhideTrackTune = false;
   moveData.noteCoords = []
   moveData.modelList = []
   clearSelection();

+ 2 - 1
src/view/fingering/fingering-relationships.ts

@@ -325,7 +325,8 @@ const relationships = {
 		30: [1, 5, 6],
 		31: [4, 5, 3],
 		32: [4, 2, 3],
-		33: [4, 2, 6],
+		// 33: [4, 2, 6],
+		33: [1, 5, 3],
 		34: [1, 2, 3],
 		35: [4, 5, 6],
 		36: [4, 2, 6],

+ 1 - 0
src/view/music-score/index.tsx

@@ -59,6 +59,7 @@ export default defineComponent({
 		},
 	},
 	setup(props, { emit, slots, expose }) {
+		(window as any).DYhideTrackTune = false;
 		const query: any = getQuery();
 		let osmd: any = null;
 		/** 设置 曲谱模式,五线谱还是简谱 */

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
stats.html


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác