From e5c0ad3eae7e63bc52a31ef03f614b4e0b3d9b39 Mon Sep 17 00:00:00 2001 From: peijunlei Date: Tue, 8 Sep 2026 13:43:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(common):=20=E4=BF=AE=E6=AD=A3=E9=A6=96?= =?UTF-8?q?=E9=A1=B5URL=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91=E4=BB=A5?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E4=B8=8E=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/common.php b/app/common.php index 99322f6..7bd1a86 100644 --- a/app/common.php +++ b/app/common.php @@ -299,6 +299,10 @@ function getMuiLangUrl($url) $firstPath = ''; } if(!empty($firstPath)){ + // 首页:/en 而非 /en/(与语言切换 buildLangUrl 一致) + if ($url === '/' || $url === '') { + return '/' . $firstPath; + } $url = '/' . $firstPath . $url; } return $url;