This commit is contained in:
hailin 2025-04-18 13:12:35 +08:00
parent a4b4081df4
commit 9b763db533
1 changed files with 1 additions and 6 deletions

View File

@ -37,12 +37,7 @@ export default function HomeRedirector() {
if (!hasLocaleInPath) {
const newPath = `/${preferred}${currentPath}`
console.log('......[HomeRedirector] Redirecting to:', newPath)
// 添加延迟跳转,延迟时间为 2 秒2000 毫秒)
setTimeout(() => {
router.replace(newPath)
}, 2000) // 这里的 2000 毫秒是 2 秒的延时,你可以根据需要调整
router.replace(newPath)
} else {
console.log('......[HomeRedirector] Already has valid locale in path, skipping redirect.')
}