Browse Source

fix(common): 修正首页URL生成逻辑以确保与语言切换一致

master
peijunlei 2 weeks ago
parent
commit
e5c0ad3eae
  1. 4
      app/common.php

4
app/common.php

@ -299,6 +299,10 @@ function getMuiLangUrl($url)
$firstPath = ''; $firstPath = '';
} }
if(!empty($firstPath)){ if(!empty($firstPath)){
// 首页:/en 而非 /en/(与语言切换 buildLangUrl 一致)
if ($url === '/' || $url === '') {
return '/' . $firstPath;
}
$url = '/' . $firstPath . $url; $url = '/' . $firstPath . $url;
} }
return $url; return $url;

Loading…
Cancel
Save