dev #7
|
@ -23,16 +23,13 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
await axios.get(props.item.song.sourceUrl ?? '', {
|
await axios.head(props.item.song.sourceUrl ?? '')
|
||||||
headers: {
|
} catch (error) {
|
||||||
'Range': 'bytes=0-0'
|
// 刷新资源地址
|
||||||
}
|
const updatedSong = await apis.getSong(props.item.song.cid)
|
||||||
})
|
console.log('Updated song:', updatedSong)
|
||||||
} catch (error) { }
|
props.item.song.sourceUrl = updatedSong.sourceUrl
|
||||||
// 刷新资源地址
|
}
|
||||||
const updatedSong = await apis.getSong(props.item.song.cid)
|
|
||||||
console.log('Updated song:', updatedSong)
|
|
||||||
props.item.song.sourceUrl = updatedSong.sourceUrl
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user