优化歌单、排行榜一键播放按钮的播放机制

This commit is contained in:
lyswhut
2021-12-23 15:28:01 +08:00
parent 469a88f368
commit 3ff0dbb7ef
6 changed files with 91 additions and 18 deletions
@@ -39,14 +39,17 @@ const useInitEnvParamPlay = () => {
const playSongListDetail = async(source, link, playIndex) => {
if (link == null) return
let list
let id
try {
list = await getListDetailAll({ source, id: decodeURIComponent(link) })
id = decodeURIComponent(link)
list = await getListDetailAll({ source, id })
} catch (err) {
console.log(err)
}
setTempList({
list,
index: getListPlayIndex(list, playIndex),
id: `${source}__${id}`,
})
}