This commit is contained in:
parent
a4b4081df4
commit
9b763db533
|
|
@ -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.')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue