Merge pull request 'dev' (#9) from dev into main
Some checks failed
Some checks failed
Reviewed-on: #9
This commit is contained in:
commit
a3d82f12ec
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "MSR Mod",
|
"name": "MSR Mod",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"description": "塞壬唱片(Monster Siren Records)官网的替代前端。",
|
"description": "塞壬唱片(Monster Siren Records)官网的替代前端。",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,17 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
await axios.head(props.item.song.sourceUrl ?? '')
|
// 添加缓存控制头和随机参数来避免缓存
|
||||||
|
await axios.head(props.item.song.sourceUrl ?? '', {
|
||||||
|
headers: {
|
||||||
|
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||||
|
'Pragma': 'no-cache',
|
||||||
|
'Expires': '0'
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
_t: Date.now() // 添加时间戳参数避免缓存
|
||||||
|
}
|
||||||
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 刷新资源地址
|
// 刷新资源地址
|
||||||
const updatedSong = await apis.getSong(props.item.song.cid)
|
const updatedSong = await apis.getSong(props.item.song.cid)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user