diff --git a/static/js/logs.js b/static/js/logs.js index 4caaabb..bcbf0e0 100644 --- a/static/js/logs.js +++ b/static/js/logs.js @@ -44,8 +44,9 @@ async function getIpGeolocation(ip) { const data = await response.json(); let location = "未知 未知"; - if (data && data.country && data.city) { - location = `${data.country} ${data.city}`; + if (data && data.addr) { + // 直接使用addr字段作为完整的地理位置信息 + location = data.addr; } // 保存到缓存