Merge branch 'feature/20260120_gil_custom' of https://git.sginfra.net/sgp-web-d/web-template-fe into feature/20260120_gil_custom

This commit is contained in:
“hyeonggkim”
2026-01-30 14:21:11 +09:00
4 changed files with 14 additions and 21 deletions

View File

@@ -123,7 +123,7 @@ const handleButtonClick = (button: PageDataResourceGroup) => {
<div
v-if="buttonList.length"
v-motion-stagger
class="flex flex-wrap justify-center gap-3 md:gap-4"
class="flex flex-wrap justify-center items-center gap-3 md:gap-4"
>
<template v-for="(button, index) in buttonList" :key="index">
<template v-if="button.btn_info?.detail?.btn_type === 'RUN'">

View File

@@ -1,10 +1,4 @@
<script setup lang="ts">
const isLoading = ref(true)
onMounted(() => {
isLoading.value = false
})
</script>
<script setup lang="ts"></script>
<template>
<LayoutsHeader />

View File

@@ -113,19 +113,18 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
}
// 91002 (Invalid LangCode): 미지원 언어로 접근
if (pageDataResponse?.code === 91002) {
// 페이지별 지원 언어에 현재 langCode가 포함되지 않는 경우
// 서비스 기본 언어(게임 기본 언어 또는 ko)로 한 번만 리다이렉트
const fallbackLang =
defaultLangCode.value ||
// defaultLangCode가 없으면 ko 우선, 없으면 첫 번째 언어, 그래도 없으면 ko
(langCodes.value?.includes('ko') ? 'ko' : langCodes.value?.[0] || 'ko')
// 이미 fallback 언어로 접근 중이라면 더 이상 리다이렉트하지 않음 (무한 루프 방지)
if (langCode === fallbackLang) {
return
// 이미 /home 경로에 있으면 무한 리다이렉트 방지
if (gamePath === '/home') {
return createError({
statusCode: 404,
statusMessage: pageDataResponse?.message,
fatal: false, // 즉시 에러 페이지로
data: {
reason: pageDataResponse?.message,
},
})
}
return navigateTo(`/${fallbackLang}/home`)
return navigateTo(`/${langCode}/home`)
}
// [TODO]

View File

@@ -61,7 +61,7 @@ export const getPathLocale = (url: string): string => {
if (!url) return ''
const cleanUrl = url.endsWith('/') ? url.slice(0, -1) : url
return cleanUrl.split('/')[1]
return cleanUrl.split('/')[1] || ''
}
/**