发布0.2.1版本

This commit is contained in:
lyswhut
2019-08-20 21:28:06 +08:00
parent 5b2a44e3bd
commit 2ff0f4b102
8 changed files with 76 additions and 34 deletions
+3 -1
View File
@@ -22,8 +22,9 @@ const getters = {
// actions
const actions = {
getUrl({ commit, state }, { musicInfo, type }) {
getUrl({ commit, state }, { musicInfo, type, isRefresh }) {
if (urlRequest && urlRequest.cancelHttp) urlRequest.cancelHttp()
if (musicInfo.typeUrl[type] && !isRefresh) return Promise.resolve()
urlRequest = music[musicInfo.source].getMusicUrl(musicInfo, type)
return urlRequest.promise.then(result => {
commit('setUrl', { musicInfo, url: result.url, type })
@@ -72,6 +73,7 @@ const mutations = {
setPlayIndex(state, index) {
state.playIndex = index
state.changePlay = true
// console.log(state.changePlay)
},
fixPlayIndex(state, index) {
state.playIndex = index