fix. 서버 미들웨어, 미들웨어 수정

This commit is contained in:
clkim
2025-12-19 17:39:46 +09:00
parent 4ca299be4a
commit 1d936966ae
25 changed files with 592 additions and 798 deletions

View File

@@ -79,13 +79,17 @@
<div v-if="launchingStatus" class="flex flex-1">
<BlocksButtonLauncher
v-if="Number(gameData?.platform_type) !== 2 && device.isDesktop || Number(gameData?.platform_type) === 1"
v-if="
(Number(gameData?.platform_type) !== 2 &&
device.isDesktop) ||
Number(gameData?.platform_type) === 1
"
type="custom"
platform="pc"
class="inspection-btn inspection-btn-primary w-full color-black text-sm md:text-base flex-1"
>
<span>{{ tm('Txt_Game_Start') }}</span>
<svg
width="16"
height="16"
@@ -103,7 +107,7 @@
</BlocksButtonLauncher>
<AtomsButtonVariant
v-else-if="Number(gameData?.platform_type) !== 1"
v-else-if="Number(gameData?.platform_type) !== 1"
type="custom"
class="inspection-btn inspection-btn-primary w-full color-black text-sm md:text-base flex-1"
@click="handleGameStart"
@@ -125,10 +129,7 @@
/>
</svg>
</AtomsButtonVariant>
</div>
</div>
</div>
</div>
@@ -139,7 +140,11 @@
:class="`platform-type-${gameData?.platform_type}`"
>
<h3 class="card-title text-base md:text-lg">
{{ t('Inspection_Txt_Download', { gameName: gameData?.game_name }) }}
{{
t('Inspection_Txt_Download', {
gameName: gameData?.game_name,
})
}}
</h3>
<div class="flex flex-row gap-3 flex-wrap">
<BlocksButtonLauncher
@@ -166,7 +171,6 @@
<script setup lang="ts">
import { globalDateFormat } from '@seed-next/date'
const config = useRuntimeConfig()
const stoveApiUrl = config.public.stoveApiUrl as string
@@ -185,7 +189,8 @@ const { t, tm, locale }: any = useI18n({
const device = useDevice()
const loadingStore = useLoadingStore()
const { webInspectionData, getInspectionDataExternal } = useGetInspectionDataExternal()
const { webInspectionData, getInspectionDataExternal } =
useGetInspectionDataExternal()
const gameDataStore = useGameDataStore()
const { gameData } = storeToRefs(gameDataStore)
await getInspectionDataExternal({
@@ -244,10 +249,12 @@ const enabledMarkets = computed(() => {
platform,
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 filteredMarkets = markets.filter(
m => m.platform !== 'app_store' && m.platform !== 'google_play'
)
const hasPc = filteredMarkets.some(m => m.platform === 'pc')
if (!hasPc) {
filteredMarkets.unshift({
@@ -257,12 +264,12 @@ const enabledMarkets = computed(() => {
}
return filteredMarkets
}
// platform_type이 2이면 pc 제외
if (platformType === 2) {
return markets.filter(m => m.platform !== 'pc')
}
// platform_type이 3이면 pc 항목 추가
if (platformType === 3) {
const hasPc = markets.some(m => m.platform === 'pc')
@@ -273,7 +280,7 @@ const enabledMarkets = computed(() => {
})
}
}
return markets
})
@@ -310,15 +317,18 @@ const getButtonText = (platform: string) => {
google_play: 'platform_google_play',
app_store: 'platform_app_store',
}
const key = platformKeyMap[platform]
return key ? tm(key) : ''
}
const handleGameStart = () => {
const os = device.isAndroid ? 'google_play' : device.isApple ? 'app_store' : 'google_play'
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')
@@ -328,11 +338,8 @@ const handleGameStart = () => {
onMounted(() => {
loadingStore.stopFullLoading()
console.log("🚀 ~ 3333 onMounted ~ enabledMarkets:", enabledMarkets.value)
})
definePageMeta({
middleware: ['inspection'],
layout: 'only-stove',
@@ -480,11 +487,11 @@ definePageMeta({
@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 {
.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) {
@@ -499,7 +506,9 @@ definePageMeta({
: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) {
: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) {