fix: data.json 加 cache-busting,避免浏览器缓存旧数据导致链接/鉴权显示错误

This commit is contained in:
2026-09-10 14:21:27 +08:00
parent 59d7a60971
commit f122db8e04
+1 -1
View File
@@ -196,7 +196,7 @@ function authPill(a){
return '<span class="pill ok">公开</span>'; return '<span class="pill ok">公开</span>';
} }
fetch('data.json') fetch('data.json?_=' + Date.now(), {cache: 'no-store'})
.then(function(r){ if(!r.ok) throw new Error('HTTP '+r.status); return r.json(); }) .then(function(r){ if(!r.ok) throw new Error('HTTP '+r.status); return r.json(); })
.then(function(d){ .then(function(d){
document.getElementById('gen-meta').textContent = '统计时间:' + d.generated_at; document.getElementById('gen-meta').textContent = '统计时间:' + d.generated_at;