fix. /로 리다이렉트시 home으로 보냄

This commit is contained in:
clkim
2025-11-20 09:45:47 +09:00
parent f29b84e8e1
commit 0918ddb5c4

View File

@@ -30,21 +30,19 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
const pageUrl = getPathAfterLanguage(to.path)
// pageUrl이 빈값이거나 null이면 /brand로 리다이렉트
// if (
// !pageUrl ||
// pageUrl === '' ||
// pageUrl === '/' ||
// pageUrl === `/${langCode}/`
// ) {
// return navigateTo(`/${langCode}/brand`, { external: false })
// }
// pageUrl이 빈값이거나 null이면 /home로 리다이렉트
if (
!pageUrl ||
pageUrl === '' ||
pageUrl === '/' ||
pageUrl === `/${langCode}/`
) {
return navigateTo(`/${langCode}/home`, { external: false })
}
// error 페이지는 API 호출하지 않음
if (pageUrl === '/error' || to.path.includes('/error')) {
console.log("🚀 ~pageData.global error 페이지는 API 호출하지 않음")
return
}
if (pageUrl === '/error' || to.path.includes('/error')) return
// 페이지 이동 시 로딩 상태 시작
loadingStore.startFullLoading()