fix(about): 调整GitHub用户数据获取超时时间
- 将GitHub用户数据请求的超时时间从5秒调整为1秒 - 优化用户体验,减少等待时间 - 确保快速失败,提高页面响应速度
This commit is contained in:
@@ -268,7 +268,7 @@ class DataManager {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Parallel Fetch with timeout
|
// 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);
|
const userData = uRes.ok ? await uRes.json() : (window.SiteConfig?.defaults?.user);
|
||||||
let allRepos = [];
|
let allRepos = [];
|
||||||
let page = 1;
|
let page = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user