fix. [PWT-124] 액션 버튼 게임 실행 타입 mo 환경 노출 오류 수정
This commit is contained in:
@@ -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,8 +122,9 @@ 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">
|
||||||
|
<template v-if="button.btn_info?.detail?.btn_type === 'RUN'">
|
||||||
<BlocksButtonLauncher
|
<BlocksButtonLauncher
|
||||||
v-if="button.btn_info?.detail?.btn_type === 'RUN'"
|
v-if="isRunButtonVisible(button.btn_info)"
|
||||||
type="duplication"
|
type="duplication"
|
||||||
:platform="button.btn_info?.detail?.market_type"
|
:platform="button.btn_info?.detail?.market_type"
|
||||||
:background-color="getColorCodeFromData(button.btn_info, 'btn')"
|
:background-color="getColorCodeFromData(button.btn_info, 'btn')"
|
||||||
@@ -114,6 +133,7 @@ const handleButtonClick = (button: PageDataResourceGroup) => {
|
|||||||
>
|
>
|
||||||
{{ button.btn_info?.txt_btn_name }}
|
{{ button.btn_info?.txt_btn_name }}
|
||||||
</BlocksButtonLauncher>
|
</BlocksButtonLauncher>
|
||||||
|
</template>
|
||||||
|
|
||||||
<AtomsButton
|
<AtomsButton
|
||||||
v-else
|
v-else
|
||||||
|
|||||||
Reference in New Issue
Block a user