From 62fff755b37e7123425295b12fc8e988c5e752d6 Mon Sep 17 00:00:00 2001 From: Rei Date: Wed, 9 Sep 2026 12:54:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8B=B9=E6=9E=9C=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9C=B0=E5=9D=80=E5=AF=BC=E8=88=AA=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout/Footer.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Layout/Footer.tsx b/src/components/Layout/Footer.tsx index 4021e0a..c803673 100644 --- a/src/components/Layout/Footer.tsx +++ b/src/components/Layout/Footer.tsx @@ -13,6 +13,7 @@ export default function Footer() { // Desktop falls back to AMap's web search. On phones use the operating system's // map-navigation scheme so the user's installed/default map app handles the route. const amapLink = `https://uri.amap.com/search?keyword=${encodeURIComponent(address)}&city=${encodeURIComponent('成都')}&view=map&src=ameiba` + const appleMapsLink = `https://maps.apple.com/?daddr=${encodeURIComponent(address)}&dirflg=d` const openNavigation = (event: MouseEvent) => { const ua = window.navigator.userAgent const destination = encodeURIComponent(address) @@ -21,7 +22,9 @@ export default function Footer() { window.location.href = `geo:0,0?q=${destination}` } else if (/iPhone|iPad|iPod/i.test(ua)) { event.preventDefault() - window.location.href = `maps://?q=${destination}` + // Apple Maps Link is an HTTPS URL, which Safari and most iOS webviews + // handle more reliably than the blocked custom `maps://` scheme. + window.location.href = appleMapsLink } } return (