|
@@ -69,6 +69,7 @@ export default defineComponent({
|
|
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 musicInfo = {
|
|
const musicInfo = {
|
|
...res.data,
|
|
...res.data,
|
|
|
|
+
|
|
...res.data.background[index],
|
|
...res.data.background[index],
|
|
};
|
|
};
|
|
// console.log("🚀 ~ musicInfo:", musicInfo);
|
|
// console.log("🚀 ~ musicInfo:", musicInfo);
|
|
@@ -85,7 +86,7 @@ export default defineComponent({
|
|
state.categoriesId = data.categoriesId;
|
|
state.categoriesId = data.categoriesId;
|
|
state.categoriesName = data.musicTagNames;
|
|
state.categoriesName = data.musicTagNames;
|
|
state.enableEvaluation = data.canEvaluate ? true : false;
|
|
state.enableEvaluation = data.canEvaluate ? true : false;
|
|
- state.examSongId = data.id + "";
|
|
|
|
|
|
+ state.examSongId = data.musicId + "";
|
|
state.examSongName = data.musicSheetName;
|
|
state.examSongName = data.musicSheetName;
|
|
// 解析扩展字段
|
|
// 解析扩展字段
|
|
if (data.extConfigJson) {
|
|
if (data.extConfigJson) {
|
|
@@ -99,7 +100,7 @@ export default defineComponent({
|
|
state.needTick = data.isOpenMetronome;
|
|
state.needTick = data.isOpenMetronome;
|
|
state.isShowFingering = data.showFingering ? true : false;
|
|
state.isShowFingering = data.showFingering ? true : false;
|
|
state.music = data.audioFileUrl;
|
|
state.music = data.audioFileUrl;
|
|
- state.accompany = data.metronomeUrl || data.metronomeUrl;
|
|
|
|
|
|
+ state.accompany = data.metronomeUrl;
|
|
state.midiUrl = data.midiUrl;
|
|
state.midiUrl = data.midiUrl;
|
|
state.parentCategoriesId = data.musicTag;
|
|
state.parentCategoriesId = data.musicTag;
|
|
state.playMode = data.audioType === "MP3" ? "MP3" : "MIDI";
|
|
state.playMode = data.audioType === "MP3" ? "MP3" : "MIDI";
|
|
@@ -117,6 +118,11 @@ export default defineComponent({
|
|
state.fingeringInfo = subjectFingering(state.subjectId);
|
|
state.fingeringInfo = subjectFingering(state.subjectId);
|
|
// console.log("🚀 ~ state.fingeringInfo:", state.fingeringInfo, state.subjectId, state.track)
|
|
// console.log("🚀 ~ state.fingeringInfo:", state.fingeringInfo, state.subjectId, state.track)
|
|
// state.isOpenPrepare = true
|
|
// state.isOpenPrepare = true
|
|
|
|
+
|
|
|
|
+ // 检测是否原音和伴奏都有
|
|
|
|
+ if (!state.music || !state.accompany) {
|
|
|
|
+ state.playSource = state.music ? "music" : "background"
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
const setCustom = () => {
|
|
const setCustom = () => {
|