From cda8e2e3b81ffdace4002224addfb3726048b37b 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 20:56:22 +0900 Subject: [PATCH] =?UTF-8?q?fix.=20=EA=B0=9C=EC=84=A0=EB=90=9C=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EB=B0=8F=20=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=A1=9C=EC=A7=81,=20=ED=94=8C=EB=9E=AB?= =?UTF-8?q?=ED=8F=BC=20=ED=83=80=EC=9E=85=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=EC=B9=B4=EB=93=9C=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages/inspection/index.vue | 162 ++++++++++++++++++++++++--------- 1 file changed, 120 insertions(+), 42 deletions(-) diff --git a/app/pages/inspection/index.vue b/app/pages/inspection/index.vue index 76ef17d..86e9d9d 100644 --- a/app/pages/inspection/index.vue +++ b/app/pages/inspection/index.vue @@ -69,7 +69,7 @@ @@ -77,29 +77,57 @@ - - 게임 시작 - - + - - - + {{ tm('Txt_Game_Start') }} + + + + + + + + {{ tm('Txt_Game_Start') }} + + + + + + + + @@ -108,16 +136,17 @@

{{ t('Inspection_Txt_Download', { gameName: gameData?.game_name }) }}

-
+
import { globalDateFormat } from '@seed-next/date' -import { useCheckGameStart } from '#layers/composables/useGameStart' const config = useRuntimeConfig() @@ -208,6 +236,7 @@ const launchingStatus = computed(() => { //gameData.value.market_json 값 중 use_yn === 1 인 항목만 배열로 변환 const enabledMarkets = computed(() => { + const platformType = Number(gameData.value.platform_type) const markets = Object.entries(gameData.value.market_json) // return Object.entries(market_json) .filter(([, info]: [string, any]) => info && info.use_yn === 1) @@ -216,8 +245,26 @@ const enabledMarkets = computed(() => { url: info.url as string, })) + // platform_type이 1이면 app_store, google_play 제외하고 pc 추가 + if (platformType === 1) { + const filteredMarkets = markets.filter(m => m.platform !== 'app_store' && m.platform !== 'google_play') + const hasPc = filteredMarkets.some(m => m.platform === 'pc') + if (!hasPc) { + filteredMarkets.unshift({ + platform: 'pc', + url: '', + }) + } + return filteredMarkets + } + + // platform_type이 2이면 pc 제외 + if (platformType === 2) { + return markets.filter(m => m.platform !== 'pc') + } + // platform_type이 3이면 pc 항목 추가 - if (Number(gameData.value.platform_type) === 3) { + if (platformType === 3) { const hasPc = markets.some(m => m.platform === 'pc') if (!hasPc) { markets.unshift({ @@ -248,7 +295,13 @@ const handleCommunityClick = () => { // 버튼 클래스 결정 함수 const getButtonClass = (platform: string) => { // pc가 있으면 pc만 flex-1, 나머지는 기본 - return `flex-1 btn-platform-${platform}` + + // platform_type이 3일 때 조건 추가 + if (Number(gameData.value.platform_type) !== 2 && platform === 'pc') { + return `flex-1 btn-platform-${platform}` + } + + return `btn-platform-${platform}` } const getButtonText = (platform: string) => { @@ -262,21 +315,21 @@ const getButtonText = (platform: string) => { return key ? tm(key) : '' } -const { validateLauncher } = useCheckGameStart() const handleGameStart = () => { - 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') - } + + const os = device.isAndroid ? 'google_play' : device.isApple ? 'app_store' : 'google_play' + + //const os = device.isAndroid ? 'google_play' : device.isApple ? 'app_store' : 'pc' + + // platform_type이 2이면서 device.isDesktop이면 window.open(gameData.value.market_json[os].url, '_blank') + + window.open(gameData.value.market_json[os].url, '_blank') } onMounted(() => { loadingStore.stopFullLoading() - console.log("🚀 ~ 3333 onMounted ~ device:", device) + console.log("🚀 ~ 3333 onMounted ~ enabledMarkets:", enabledMarkets.value) }) @@ -359,7 +412,7 @@ definePageMeta({ } .inspection-btn { - @apply flex items-center justify-center gap-1 px-2 md:px-8 w-auto h-10 md:h-12 rounded-lg; + @apply flex items-center justify-center gap-1 px-2 md:px-4 h-10 md:h-12 rounded-lg; cursor: pointer; transition: all 0.2s; } @@ -421,20 +474,34 @@ definePageMeta({ @apply bg-gray-50; } .inspection-download-card .btn-platform-pc { - @apply w-auto hidden md:block flex-1; + @apply w-auto flex-1; } -:deep(.inspection-download-card .btn-platform-app_store) { - @apply px-2 md:px-4; +.inspection-download-card.platform-type-3 .btn-platform-pc { + @apply w-full flex-none hidden md:flex md:flex-1; +} + + +.inspection-download-card .btn-platform-app_store { + @apply flex-1 px-2 md:px-4; +} +.inspection-download-card.platform-type-3 .btn-platform-app_store, .inspection-download-card.platform-type-3 .btn-platform-google_play { + @apply flex-1 px-2 md:px-4 md:flex-none; } :deep(.inspection-download-card .btn-platform-app_store .text) { @apply block md:hidden; } +:deep(.inspection-download-card.platform-type-2 .btn-platform-app_store .text) { + @apply block md:block; +} :deep(.inspection-download-card .btn-platform-google_play) { - @apply px-2 md:px-4; + @apply flex-1 px-2 md:px-4; } :deep(.inspection-download-card .btn-platform-google_play .text) { @apply block md:hidden; } +:deep(.inspection-download-card.platform-type-2 .btn-platform-google_play .text) { + @apply block md:block; +} :deep(.inspection-download-card .btn-base.single .icon-platform) { @apply mr-2 md:mr-0; } @@ -442,6 +509,17 @@ definePageMeta({ @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; +} + +.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; }