|
@@ -1444,6 +1444,13 @@ const getMusicInfo = async (res: any) => {
|
|
|
} else {
|
|
|
(window as any).DYFirstTrackName = '';
|
|
|
}
|
|
|
+ // 如果是作业模式,需要默认渲染当前学生声部对应的声轨
|
|
|
+ if (state.isHomeWork && storeData.user?.instrumentId) {
|
|
|
+ const currentTrack = res.data.musicSheetSoundList.find((item: any) => item.musicalInstrumentId === storeData.user?.instrumentId)?.track;
|
|
|
+ if (currentTrack) {
|
|
|
+ partIndex = tracks.findIndex(item => item === currentTrack) || partIndex
|
|
|
+ }
|
|
|
+ }
|
|
|
// 设置音源 track 为当前的声轨 index为当前的
|
|
|
const { track, index, musicalInstrumentId } = state.isSimplePage ? { track:tracks[0], index:0, musicalInstrumentId: '' } : initMusicSource(res.data, tracks, partIndex, workRecordInstrumentId)
|
|
|
// 这里返回的track可能和实际的对不上,所以重新筛选一下
|