Merge branch 'feature/20250930_cl_GR_GALLERY' into feature/20250910-all
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { commonFetch } from '#layers/utils/apiUtil'
|
||||
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
||||
import { useGetGameAlias } from '#layers/composables/useGetGameAlias'
|
||||
import { useGetGameDomain } from '#layers/composables/useGetGameDomain'
|
||||
import { usePathResolver } from '#layers/composables/usePathResolver'
|
||||
import type { PageDataResponse } from '#layers/types/api/pageData'
|
||||
|
||||
export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
const config = useRuntimeConfig()
|
||||
const store = usePageDataStore()
|
||||
const gameAlias = useGetGameAlias()
|
||||
const gameDomain = useGetGameDomain()
|
||||
const { getPathAfterLanguage } = usePathResolver()
|
||||
const headers = useRequestHeaders()
|
||||
const langCode = ssrGetFinalLocale(to.path, headers)
|
||||
@@ -17,7 +17,7 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
|
||||
try {
|
||||
const pageUrl = getPathAfterLanguage(to.path)
|
||||
console.log("🚀 ~ pageUrl:", pageUrl)
|
||||
console.log('🚀 ~ pageUrl:', pageUrl)
|
||||
|
||||
// pageUrl이 빈값이거나 null이면 /brand로 리다이렉트
|
||||
if (!pageUrl || pageUrl === '' || pageUrl === '/') {
|
||||
@@ -25,12 +25,12 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
}
|
||||
|
||||
const queryParams: Record<string, string> = {
|
||||
game_domain: gameAlias,
|
||||
game_domain: gameDomain,
|
||||
lang_code: langCode,
|
||||
page_url: pageUrl,
|
||||
_t: Date.now().toString(), // 캐시 무효화를 위한 타임스탬프
|
||||
}
|
||||
console.log("🚀 ~ queryParams:", queryParams)
|
||||
console.log('🚀 ~ queryParams:', queryParams)
|
||||
|
||||
const response = (await commonFetch('GET', apiUrl, {
|
||||
query: queryParams,
|
||||
|
||||
Reference in New Issue
Block a user