From 74ef11ff05717026789edc532cb18caeadf81e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chyeonggkim=E2=80=9D?= <“hyeonggkim@smilegate.com”> Date: Tue, 9 Dec 2025 19:17:10 +0900 Subject: [PATCH] =?UTF-8?q?fix.=20=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=20=EB=B0=8F=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EA=B0=9C=EC=84=A0,=20=EB=8B=A4=EC=9A=B4=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=B9=B4=EB=93=9C=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages/inspection/index.vue | 117 +++++++++++++++++++---------- layers/composables/useAnalytics.ts | 2 +- 2 files changed, 77 insertions(+), 42 deletions(-) diff --git a/app/pages/inspection/index.vue b/app/pages/inspection/index.vue index aa262fc..76ef17d 100644 --- a/app/pages/inspection/index.vue +++ b/app/pages/inspection/index.vue @@ -69,7 +69,7 @@ @@ -77,12 +77,11 @@ - 게임 시작 @@ -100,7 +99,8 @@ fill="#332C2A" /> - + + @@ -110,14 +110,14 @@ class="inspection-card inspection-download-card" >

- {{ tm('Inspection_Txt_Download') || '게임 다운로드' }} + {{ t('Inspection_Txt_Download', { gameName: gameData?.game_name }) }}

{ //gameData.value.market_json 값 중 use_yn === 1 인 항목만 배열로 변환 const enabledMarkets = computed(() => { - return ( - Object.entries(gameData.value.market_json) - // return Object.entries(market_json) - .filter(([, info]: [string, any]) => info && info.use_yn === 1) - .map(([platform, info]: [string, any]) => ({ - platform, - url: info.url as string, - })) - ) + const markets = Object.entries(gameData.value.market_json) + // return Object.entries(market_json) + .filter(([, info]: [string, any]) => info && info.use_yn === 1) + .map(([platform, info]: [string, any]) => ({ + platform, + url: info.url as string, + })) + + // platform_type이 3이면 pc 항목 추가 + if (Number(gameData.value.platform_type) === 3) { + const hasPc = markets.some(m => m.platform === 'pc') + if (!hasPc) { + markets.unshift({ + platform: 'pc', + url: '', + }) + } + } + + return markets }) const logoImgUrl = computed(() => { @@ -235,41 +248,35 @@ const handleCommunityClick = () => { // 버튼 클래스 결정 함수 const getButtonClass = (platform: string) => { // pc가 있으면 pc만 flex-1, 나머지는 기본 - const hasPc = enabledMarkets.value.some(btn => btn.platform === 'pc') - if (hasPc) { - return platform === 'pc' ? `flex-1 btn-platform-pc` : `` - } - //pc가 없으면서 하나만 있으면 '' - if (enabledMarkets.value.length === 1) { - return `` - } - return `flex-1` + return `flex-1 btn-platform-${platform}` } const getButtonText = (platform: string) => { - const hasPc = enabledMarkets.value.some(btn => btn.platform === 'pc') - // pc가 있으면 pc만 텍스트 노출 - if (hasPc) { - return platform === 'pc' ? tm('platform_pc') : '' + const platformKeyMap: Record = { + pc: 'platform_pc', + google_play: 'platform_google_play', + app_store: 'platform_app_store', } - // pc가 없으면 google_play와 app_store만 텍스트 노출 - if (platform === 'google_play') { - return tm('platform_google_play') - } - if (platform === 'app_store') { - return tm('platform_app_store') - } - - return '' + + const key = platformKeyMap[platform] + return key ? tm(key) : '' } const { validateLauncher } = useCheckGameStart() const handleGameStart = () => { - validateLauncher() + if (device.isDesktop) { + validateLauncher() + } else if (device.isIos) { + window.open(gameData.value.market_json.app_store.url, '_blank') + } else if (device.isAndroid) { + window.open(gameData.value.market_json.google_play.url, '_blank') + } } onMounted(() => { loadingStore.stopFullLoading() + + console.log("🚀 ~ 3333 onMounted ~ device:", device) }) @@ -306,7 +313,7 @@ definePageMeta({ } .inspection-card { - @apply bg-white rounded-2xl p-6 md:p-8; + @apply bg-white rounded-2xl px-4 py-6 md:p-8; } .inspection-time-card { @@ -352,7 +359,7 @@ definePageMeta({ } .inspection-btn { - @apply flex items-center justify-center gap-1 px-6 md:px-8 w-auto h-10 md:h-12 rounded-lg; + @apply flex items-center justify-center gap-1 px-2 md:px-8 w-auto h-10 md:h-12 rounded-lg; cursor: pointer; transition: all 0.2s; } @@ -413,4 +420,32 @@ definePageMeta({ .inspection-btn-community.inspection-btn-outline:hover { @apply bg-gray-50; } +.inspection-download-card .btn-platform-pc { + @apply w-auto hidden md:block flex-1; +} +:deep(.inspection-download-card .btn-platform-app_store) { + @apply px-2 md:px-4; +} +:deep(.inspection-download-card .btn-platform-app_store .text) { + @apply block md:hidden; +} +:deep(.inspection-download-card .btn-platform-google_play) { + @apply px-2 md:px-4; +} +:deep(.inspection-download-card .btn-platform-google_play .text) { + @apply block md:hidden; +} +:deep(.inspection-download-card .btn-base.single .icon-platform) { + @apply mr-2 md:mr-0; +} +.inspection-btn-primary.btn-base { + @apply bg-[var(--primary)] border-[var(--primary)] text-[#000]; +} + +.inspection-btn-primary.btn-base:deep(.text) { + @apply flex flex-1 items-center justify-center gap-1; +} +.inspection-btn-primary.btn-base:deep(.icon-platform) { + @apply hidden; +} diff --git a/layers/composables/useAnalytics.ts b/layers/composables/useAnalytics.ts index 62dae88..dd9fe1e 100644 --- a/layers/composables/useAnalytics.ts +++ b/layers/composables/useAnalytics.ts @@ -190,7 +190,7 @@ const sendSA = ( click_area: clickArea, click_sarea: clickSarea, click_item: { - click_item: analytics.clickItem, + pwt_click_item: analytics.clickItem, game_no: gameNo, lang_cd: eventLocale, ...options?.clickItem,