在背景图片加载失败时添加重试机制,3秒后自动重试加载背景图片

This commit is contained in:
jxxghp
2025-05-13 08:18:44 +08:00
parent c59be8d981
commit bcb72118f5

View File

@@ -166,7 +166,10 @@ function loadBackgroundImages() {
startBackgroundRotation()
})
.catch(() => {
console.error('加载背景图片失败')
// 3秒后重试
setTimeout(() => {
loadBackgroundImages()
}, 3000)
})
}