diff --git a/public/index.html b/public/index.html
index 8ab8b7a..ef63a70 100644
--- a/public/index.html
+++ b/public/index.html
@@ -14,7 +14,8 @@
-
+
@@ -132,33 +133,40 @@
});
let detailHtml = `
-
-
-
- 接口 |
- 今日调用 |
- 总调用 |
- 查看 |
-
-
-
- `;
+
+
+
+ 接口 |
+ 今日调用 |
+ 总调用 |
+ URL数量 |
+ 查看 |
+
+
+
+ `;
+
+ // 同时加载URL统计数据
+ const urlStatsResponse = await fetch('/urlstats');
+ const urlStats = await urlStatsResponse.json();
sortedEndpoints.forEach(([endpoint, stat]) => {
+ const urlCount = urlStats[endpoint]?.total_urls || 0;
detailHtml += `
-
-
-
- ${getDisplayName(endpoint, endpointConfig)}
-
- |
- ${stat.today_calls} |
- ${stat.total_calls} |
- 👀 |
-
+
+
+
+ ${getDisplayName(endpoint, endpointConfig)}
+
+ |
+ ${stat.today_calls} |
+ ${stat.total_calls} |
+ ${urlCount} |
+ 👀 |
+
`;
});
diff --git a/services/csv_service.go b/services/csv_service.go
index 798ac61..cdef5c8 100644
--- a/services/csv_service.go
+++ b/services/csv_service.go
@@ -121,14 +121,14 @@ func LoadCSVPaths() error {
}
func GetCSVContent(path string) (*models.URLSelector, error) {
- log.Printf("开始获取CSV内容: %s", path)
+ // log.Printf("开始获取CSV内容: %s", path)
Mu.RLock()
selector, exists := csvCache[path]
Mu.RUnlock()
if exists {
- log.Printf("从缓存中获取到CSV内容: %s", path)
+ // log.Printf("从缓存中获取到CSV内容: %s", path)
return selector, nil
}