fix. 이미지 경로 에러 수정
This commit is contained in:
@@ -195,17 +195,14 @@ export const getResourceSrc = (
|
|||||||
resourcesType?: 'IMG' | 'VID'
|
resourcesType?: 'IMG' | 'VID'
|
||||||
) => {
|
) => {
|
||||||
if (!resourcesData) return null
|
if (!resourcesData) return null
|
||||||
const resPath = resourcesData.res_path
|
const resPath = resourcesData?.res_path
|
||||||
const resType = resourcesType || resourcesData.resource_type
|
const resType = resourcesType || resourcesData?.resource_type
|
||||||
|
|
||||||
const pcField = isTypeVideo(resType) ? 'path_vid_pc' : 'path_pc'
|
const pcField = isTypeVideo(resType) ? 'path_vid_pc' : 'path_pc'
|
||||||
const mobileField = isTypeVideo(resType) ? 'path_vid_mo' : 'path_mo'
|
const mobileField = isTypeVideo(resType) ? 'path_vid_mo' : 'path_mo'
|
||||||
|
|
||||||
const pcPath = resPath[pcField] || resPath[mobileField]
|
const pcPath = resPath?.[pcField] || resPath?.[mobileField] || ''
|
||||||
const mobilePath = resPath[mobileField] || resPath[pcField]
|
const mobilePath = resPath?.[mobileField] || resPath?.[pcField] || ''
|
||||||
|
|
||||||
// 경로가 없으면 null 반환
|
|
||||||
if (!pcPath && !mobilePath) return null
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pc: pcPath,
|
pc: pcPath,
|
||||||
|
|||||||
@@ -112,10 +112,5 @@ export default defineNuxtConfig({
|
|||||||
allowedHosts: true,
|
allowedHosts: true,
|
||||||
},
|
},
|
||||||
base: '/',
|
base: '/',
|
||||||
// 프로덕션에서 hydration mismatch 상세 로그 활성화 (디버깅 후 제거 권장)
|
|
||||||
define: {
|
|
||||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true,
|
|
||||||
},
|
|
||||||
// 제거
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user