新的实用更新

This commit is contained in:
Chance_Li
2025-09-04 14:31:44 +08:00
parent b8456c437a
commit 71a648fdf4
11 changed files with 1071 additions and 136 deletions

View File

@@ -159,13 +159,24 @@ class IPQueryApp {
queryTimeElement.textContent = now.toLocaleString('zh-CN');
}
// 更新详细信息
this.updateDetailItem('location', data.location || '未知');
this.updateDetailItem('isp', data.isp || '未知');
this.updateDetailItem('country', data.country || '未知');
this.updateDetailItem('region', data.region || '未知');
this.updateDetailItem('city', data.city || '未知');
this.updateDetailItem('timezone', data.timezone || '未知');
// 更新详细信息 - 只显示API提供的数据
if (data.location) this.updateDetailItem('location', data.location);
else this.hideDetailItem('location');
if (data.isp) this.updateDetailItem('isp', data.isp);
else this.hideDetailItem('isp');
if (data.country) this.updateDetailItem('country', data.country);
else this.hideDetailItem('country');
if (data.region) this.updateDetailItem('region', data.region);
else this.hideDetailItem('region');
if (data.city) this.updateDetailItem('city', data.city);
else this.hideDetailItem('city');
if (data.timezone) this.updateDetailItem('timezone', data.timezone);
else this.hideDetailItem('timezone');
// 显示IP信息隐藏错误信息
if (ipInfo) ipInfo.style.display = 'block';
@@ -180,6 +191,23 @@ class IPQueryApp {
const element = document.getElementById(id);
if (element) {
element.textContent = value;
// 显示对应的详细信息行
const detailRow = element.closest('.detail-item');
if (detailRow) {
detailRow.style.display = 'flex';
}
}
}
// 隐藏详细信息项
hideDetailItem(id) {
const element = document.getElementById(id);
if (element) {
// 隐藏整个详细信息行
const detailRow = element.closest('.detail-item');
if (detailRow) {
detailRow.style.display = 'none';
}
}
}

View File

@@ -1,3 +1,3 @@
[
"https://60s.viki.moe/v2/ip"
]
]

View File

@@ -0,0 +1,17 @@
{
"code": 200,
"message": "获取成功。数据来自官方/权威源头,以确保稳定与实时。开源地址 https://github.com/vikiboss/60s反馈群 595941841",
"data": {
"ip": "2401:b60:16:83::"
}
}
// 注意此API只返回IP地址不包含以下信息
// - location (位置信息)
// - isp (网络服务商)
// - country (国家)
// - region (地区)
// - city (城市)
// - timezone (时区)
//
// 使API