修复稍后播放问题
parent
c7f0fcbe9f
commit
9447034deb
|
@ -415,7 +415,7 @@ const mutations = {
|
||||||
},
|
},
|
||||||
setTempPlayList(state, list) {
|
setTempPlayList(state, list) {
|
||||||
addTempPlayList(list)
|
addTempPlayList(list)
|
||||||
if (!playMusicInfo.musicInfo) this.commit('player/playNext')
|
if (!playMusicInfo.musicInfo) this.dispatch('player/playNext')
|
||||||
},
|
},
|
||||||
removeTempPlayList(state, index) {
|
removeTempPlayList(state, index) {
|
||||||
removeTempPlayList(index)
|
removeTempPlayList(index)
|
||||||
|
|
|
@ -81,8 +81,7 @@ const actions = {
|
||||||
commit('clearList')
|
commit('clearList')
|
||||||
return music[source].songList.getList(sortId, tabId, page).then(result => commit('setList', { result, key, page }))
|
return music[source].songList.getList(sortId, tabId, page).then(result => commit('setList', { result, key, page }))
|
||||||
},
|
},
|
||||||
getListDetail({ state, rootState, commit }, { id, page }) {
|
getListDetail({ state, commit }, { id, source, page }) {
|
||||||
let source = rootState.setting.songList.source
|
|
||||||
let key = `sdetail__${source}__${id}__${page}`
|
let key = `sdetail__${source}__${id}__${page}`
|
||||||
if (state.listDetail.list.length && state.listDetail.key == key) return Promise.resolve()
|
if (state.listDetail.list.length && state.listDetail.key == key) return Promise.resolve()
|
||||||
commit('clearListDetail')
|
commit('clearListDetail')
|
||||||
|
|
|
@ -209,7 +209,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleToggleListDetailPage(page) {
|
handleToggleListDetailPage(page) {
|
||||||
this.handleGetListDetail(this.selectListInfo.id, page).then(() => {
|
this.handleGetListDetail(this.selectListInfo.id, this.selectListInfo.source, page).then(() => {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.songList.scrollToTop()
|
this.$refs.songList.scrollToTop()
|
||||||
})
|
})
|
||||||
|
@ -220,7 +220,7 @@ export default {
|
||||||
this.setSelectListInfo(this.listData.list[index])
|
this.setSelectListInfo(this.listData.list[index])
|
||||||
this.setVisibleListDetail(true)
|
this.setVisibleListDetail(true)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.handleGetListDetail(this.selectListInfo.id, 1)
|
this.handleGetListDetail(this.selectListInfo.id, this.source, 1)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// handleFlowBtnClick(action) {
|
// handleFlowBtnClick(action) {
|
||||||
|
@ -246,17 +246,18 @@ export default {
|
||||||
handleImportSongListEvent({ action }) {
|
handleImportSongListEvent({ action }) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'submit':
|
case 'submit':
|
||||||
this.handleGetSongListDetail()
|
this.handleGetSongListDetail(this.importSongListText, this.source)
|
||||||
break
|
break
|
||||||
// case 'blur':
|
// case 'blur':
|
||||||
// break
|
// break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleGetSongListDetail() {
|
handleGetSongListDetail(id, source) {
|
||||||
if (!this.importSongListText.length) return
|
if (!id.length) return
|
||||||
|
console.log(id, source)
|
||||||
this.setSelectListInfo({
|
this.setSelectListInfo({
|
||||||
play_count: null,
|
play_count: null,
|
||||||
id: this.importSongListText,
|
id,
|
||||||
author: '',
|
author: '',
|
||||||
name: '',
|
name: '',
|
||||||
img: null,
|
img: null,
|
||||||
|
@ -264,15 +265,15 @@ export default {
|
||||||
source: this.source,
|
source: this.source,
|
||||||
})
|
})
|
||||||
this.setVisibleListDetail(true)
|
this.setVisibleListDetail(true)
|
||||||
this.handleGetListDetail(this.importSongListText, 1)
|
this.handleGetListDetail(id, source, 1)
|
||||||
},
|
},
|
||||||
setTagListWidth() {
|
setTagListWidth() {
|
||||||
this.isInitedTagListWidth = true
|
this.isInitedTagListWidth = true
|
||||||
this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2
|
this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2
|
||||||
},
|
},
|
||||||
handleGetListDetail(id, page) {
|
handleGetListDetail(id, source, page) {
|
||||||
this.isGetDetailFailed = false
|
this.isGetDetailFailed = false
|
||||||
return this.getListDetail({ id, page }).catch(err => {
|
return this.getListDetail({ id, source, page }).catch(err => {
|
||||||
this.isGetDetailFailed = true
|
this.isGetDetailFailed = true
|
||||||
return Promise.reject(err)
|
return Promise.reject(err)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue