From 473211c86cd0881e0545dcacbb0b6f76b3c949b4 Mon Sep 17 00:00:00 2001 From: timmy Date: Mon, 20 Apr 2026 10:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=87=E8=B3=87=E6=96=99=E4=BE=86=E6=BA=90?= =?UTF-8?q?=E5=BE=9E=20spots.json=20=E5=88=87=E6=8F=9B=E5=88=B0=E5=BE=8C?= =?UTF-8?q?=E7=AB=AF=20/scan=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 於檔頭新增 API_URL / SCAN_CENTER 常數,方便之後切換 IP / port - fetch 改 POST,body 帶 lat/lng(後端要求的 schema,值本身會被忽略) - 空 items 改顯示「目前無資料」提示,處理 API stale-while-revalidate 快取剛過期時首打會回空陣列的情境 - 保留 toList() 對頂層陣列的相容、保留座標欄位三種別名 fallback Co-Authored-By: Claude Opus 4.7 (1M context) --- index.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index eee8869..fbbab47 100644 --- a/index.html +++ b/index.html @@ -208,6 +208,11 @@