fix. [PWT-124] 액션 버튼 게임 실행 타입 mo 환경 노출 오류 수정

This commit is contained in:
clkim
2025-11-27 18:51:49 +09:00
parent b3f20007bf
commit 5d14a92399

View File

@@ -18,6 +18,7 @@ const scrollStore = useScrollStore()
const breakpoints = useResponsiveBreakpoints() const breakpoints = useResponsiveBreakpoints()
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics() const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
const { tm } = useI18n() const { tm } = useI18n()
const device = useDevice()
const buttonList = computed<PageDataResourceGroup[]>( const buttonList = computed<PageDataResourceGroup[]>(
() => props.resourcesData ?? [] () => props.resourcesData ?? []
@@ -36,6 +37,23 @@ const getButtonType = (btnInfo?: PageDataResourceGroupBtnInfo): ButtonType => {
return 'action' return 'action'
} }
const isRunButtonVisible = (btnInfo: PageDataResourceGroupBtnInfo): boolean => {
if (breakpoints.value?.isDesktop) return true
const marketType = btnInfo?.detail?.market_type
switch (marketType) {
case 'pc':
return false
case 'google_play':
return device.isAndroid
case 'app_store':
return device.isApple
default:
return true
}
}
const downloadZip = async (url: string, osType: number) => { const downloadZip = async (url: string, osType: number) => {
if (osType === 1 && breakpoints.value?.isMobile) { if (osType === 1 && breakpoints.value?.isMobile) {
modalStore.handleOpenAlert({ contentText: tm('Alert_Download_PC') }) modalStore.handleOpenAlert({ contentText: tm('Alert_Download_PC') })
@@ -104,16 +122,18 @@ const handleButtonClick = (button: PageDataResourceGroup) => {
class="flex flex-wrap justify-center gap-3 md:gap-4" class="flex flex-wrap justify-center gap-3 md:gap-4"
> >
<template v-for="(button, index) in buttonList" :key="index"> <template v-for="(button, index) in buttonList" :key="index">
<BlocksButtonLauncher <template v-if="button.btn_info?.detail?.btn_type === 'RUN'">
v-if="button.btn_info?.detail?.btn_type === 'RUN'" <BlocksButtonLauncher
type="duplication" v-if="isRunButtonVisible(button.btn_info)"
:platform="button.btn_info?.detail?.market_type" type="duplication"
:background-color="getColorCodeFromData(button.btn_info, 'btn')" :platform="button.btn_info?.detail?.market_type"
:text-color="getColorCodeFromData(button.btn_info, 'txt')" :background-color="getColorCodeFromData(button.btn_info, 'btn')"
@click="handleButtonClick(button)" :text-color="getColorCodeFromData(button.btn_info, 'txt')"
> @click="handleButtonClick(button)"
{{ button.btn_info?.txt_btn_name }} >
</BlocksButtonLauncher> {{ button.btn_info?.txt_btn_name }}
</BlocksButtonLauncher>
</template>
<AtomsButton <AtomsButton
v-else v-else