|
@@ -110,7 +110,7 @@ export default defineComponent({
|
|
/** 获取曲谱数据 */
|
|
/** 获取曲谱数据 */
|
|
const getMusicInfo = (res: any) => {
|
|
const getMusicInfo = (res: any) => {
|
|
const index = query["part-index"] ? parseInt(query["part-index"] as string) : 0;
|
|
const index = query["part-index"] ? parseInt(query["part-index"] as string) : 0;
|
|
- const musicData = res.data.background[index] || {};
|
|
|
|
|
|
+ const musicData = res.data.background?.[index] || {};
|
|
const musicInfo = {
|
|
const musicInfo = {
|
|
...res.data,
|
|
...res.data,
|
|
music: musicData.audioFileUrl || res.data.audioFileUrl,
|
|
music: musicData.audioFileUrl || res.data.audioFileUrl,
|
|
@@ -159,6 +159,8 @@ export default defineComponent({
|
|
const track = data.code || data.track;
|
|
const track = data.code || data.track;
|
|
state.track = track ? track.replace(/ /g, "").toLocaleLowerCase() : "";
|
|
state.track = track ? track.replace(/ /g, "").toLocaleLowerCase() : "";
|
|
state.enableNotation = data.notation ? true : false;
|
|
state.enableNotation = data.notation ? true : false;
|
|
|
|
+ // 是否是合奏,先根据background判断
|
|
|
|
+ state.isConcert = data.background?.length > 1
|
|
|
|
|
|
// console.log("🚀 ~ state.subjectId:", state.subjectId, state.track as any , state.subjectId)
|
|
// console.log("🚀 ~ state.subjectId:", state.subjectId, state.track as any , state.subjectId)
|
|
// 是否打击乐
|
|
// 是否打击乐
|
|
@@ -172,7 +174,7 @@ export default defineComponent({
|
|
state.isSpecialBookCategory = !classids.includes(data.musicSheetCategoriesId)
|
|
state.isSpecialBookCategory = !classids.includes(data.musicSheetCategoriesId)
|
|
|
|
|
|
// 设置指法
|
|
// 设置指法
|
|
- const code = mappingVoicePart(state.subjectId, "INSTRUMENT");
|
|
|
|
|
|
+ const code = state.isConcert ? mappingVoicePart(state.trackId, "ENSEMBLE") : mappingVoicePart(state.subjectId, "INSTRUMENT");
|
|
state.fingeringInfo = subjectFingering(code);
|
|
state.fingeringInfo = subjectFingering(code);
|
|
console.log("🚀 ~ state.fingeringInfo:", code, state.fingeringInfo, state.trackId, state.track);
|
|
console.log("🚀 ~ state.fingeringInfo:", code, state.fingeringInfo, state.trackId, state.track);
|
|
|
|
|
|
@@ -189,8 +191,6 @@ export default defineComponent({
|
|
|
|
|
|
//课堂乐器, 渲染类型: 五线谱, 简谱
|
|
//课堂乐器, 渲染类型: 五线谱, 简谱
|
|
state.musicRenderType = query.musicRenderType || EnumMusicRenderType.firstTone;
|
|
state.musicRenderType = query.musicRenderType || EnumMusicRenderType.firstTone;
|
|
- // 是否是合奏,先根据background判断
|
|
|
|
- state.isConcert = data.background?.length > 1
|
|
|
|
console.log('state对象', state)
|
|
console.log('state对象', state)
|
|
};
|
|
};
|
|
|
|
|