fix(about): 调整GitHub用户数据获取超时时间

- 将GitHub用户数据请求的超时时间从5秒调整为1秒
- 优化用户体验,减少等待时间
- 确保快速失败,提高页面响应速度
This commit is contained in:
hehh
2025-11-26 12:41:34 +08:00
parent ac6c85a490
commit 9f0d3d0a2a

View File

@@ -268,7 +268,7 @@ class DataManager {
try {
// Parallel Fetch with timeout
const uRes = await this.fetchWithTimeout(`https://api.github.com/users/${user}`, { timeout: 5000 });
const uRes = await this.fetchWithTimeout(`https://api.github.com/users/${user}`, { timeout: 1000 });
const userData = uRes.ok ? await uRes.json() : (window.SiteConfig?.defaults?.user);
let allRepos = [];
let page = 1;