|
@@ -1496,9 +1496,17 @@ function initMusicSource(data: any, tracks: string[], partIndex: number) {
|
|
|
}
|
|
|
}
|
|
|
const setState = (data: any, index: number) => {
|
|
|
- // 根据当前文件有没有 设置当前的播放模式
|
|
|
- if(!state.music){
|
|
|
- if(state.accompany){
|
|
|
+ // 获取当前模式 声部切换用
|
|
|
+ const localStoragePlayType = localStorage.getItem("musicScorePlayType")
|
|
|
+ if(localStoragePlayType) {
|
|
|
+ localStorage.removeItem("musicScorePlayType")
|
|
|
+ state.playType = localStoragePlayType as any
|
|
|
+ }
|
|
|
+ // 根据当前文件有没有 设置当前的播放模式
|
|
|
+ if(state.playType === "play"){
|
|
|
+ if(state.music){
|
|
|
+ state.playSource = "music"
|
|
|
+ }else if(state.accompany){
|
|
|
state.playSource = "background"
|
|
|
}else{
|
|
|
if(state.fanSong){
|
|
@@ -1512,7 +1520,24 @@ const setState = (data: any, index: number) => {
|
|
|
state.playSource = "mingSong"
|
|
|
}
|
|
|
}
|
|
|
+ }else{
|
|
|
+ if(state.fanSong){
|
|
|
+ state.playSource = "music"
|
|
|
+ }else if(state.banSong){
|
|
|
+ state.playSource = "background"
|
|
|
+ }else if(state.mingSong){
|
|
|
+ state.playSource = "mingSong"
|
|
|
+ }else{
|
|
|
+ if(state.music){
|
|
|
+ state.playType = "play"
|
|
|
+ state.playSource = "music"
|
|
|
+ }else if(state.accompany){
|
|
|
+ state.playType = "play"
|
|
|
+ state.playSource = "background"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
state.appName = "COLEXIU";
|
|
|
state.detailId = data.bizId;
|
|
|
state.xmlUrl = data.xmlFileUrl;
|