移除虾米源,允许播放除了搜索列表以外的所有歌曲

This commit is contained in:
lyswhut
2021-02-05 23:06:08 +08:00
parent a0254eb4f2
commit c78811fe36
13 changed files with 134 additions and 65 deletions
+11 -1
View File
@@ -1,3 +1,5 @@
import musicSdk from '../../utils/music'
let allList = {}
window.allList = allList
@@ -48,7 +50,12 @@ const getters = {
// actions
const actions = {
getOtherSource({ state, commit }, musicInfo) {
return (musicInfo.otherSource && musicInfo.otherSource.length ? Promise.resolve(musicInfo.otherSource) : musicSdk.findMusic(musicInfo)).then(otherSource => {
commit('setOtherSource', { musicInfo, otherSource })
return otherSource
})
},
}
// mitations
@@ -217,6 +224,9 @@ const mutations = {
}
}
},
setOtherSource(state, { musicInfo, otherSource }) {
musicInfo.otherSource = otherSource
},
}
export default {