From 1dd1f15788d83f1978b2bcd443b73f2c0d03f0ea Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 2 Jan 2026 22:51:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=98=BE=E7=A4=BAIP?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/logs.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } // 保存到缓存