|
@@ -62,6 +62,7 @@ export default defineComponent({
|
|
|
const index = query["part-index"] ? parseInt(query["part-index"] as string) : 0;
|
|
|
const musicInfo = {
|
|
|
...res.data,
|
|
|
+ accompany: res.data.audioFileUrl,
|
|
|
...res.data.background[index],
|
|
|
};
|
|
|
// console.log("🚀 ~ musicInfo:", musicInfo);
|
|
@@ -93,7 +94,7 @@ export default defineComponent({
|
|
|
state.needTick = true; // data.isOpenMetronome;
|
|
|
state.isShowFingering = data.showFingering ? true : false;
|
|
|
state.music = data.audioFileUrl;
|
|
|
- state.accompany = data.metronomeUrl || data.metronomeUrl;
|
|
|
+ state.accompany = data.accompany;
|
|
|
state.midiUrl = data.midiUrl;
|
|
|
state.parentCategoriesId = data.musicTag;
|
|
|
state.playMode = data.audioType === "MP3" ? "MP3" : "MIDI";
|
|
@@ -109,6 +110,11 @@ export default defineComponent({
|
|
|
// 设置指法
|
|
|
state.fingeringInfo = subjectFingering(state.subjectId);
|
|
|
// console.log("🚀 ~ state.fingeringInfo:", state.fingeringInfo, state.subjectId, state.track)
|
|
|
+
|
|
|
+ // 检测是否原音和伴奏都有
|
|
|
+ if (!state.music || !state.accompany) {
|
|
|
+ state.playSource = state.music ? "music" : "background";
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const setCustom = () => {
|