数据由展示每天的改为累计的
This commit is contained in:
@@ -47,10 +47,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
const j = await r.json();
|
||||
if (j && j.success && j.today) updateStatsUI(j.today);
|
||||
if (j && j.success) {
|
||||
const t = j.total || j.today;
|
||||
updateStatsUI(t);
|
||||
}
|
||||
} catch {}
|
||||
};
|
||||
(async () => { try { const r = await fetch('api/stats.php'); const j = await r.json(); if (j && j.success && j.today) updateStatsUI(j.today); } catch {} })();
|
||||
(async () => { try { const r = await fetch('api/stats.php'); const j = await r.json(); if (j && j.success) updateStatsUI(j.total || j.today); } catch {} })();
|
||||
track({ event: 'visit', page: location.pathname });
|
||||
// 底部工具栏与标题已移除,无需获取相关元素
|
||||
|
||||
|
||||
Reference in New Issue
Block a user