diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx index cad82841..a813f530 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx @@ -1410,9 +1410,22 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props ]); useEffect(() => { + console.log('[PlayerPanel] VOD useEffect 진입', { + shptmBanrTpNm: panelInfo.shptmBanrTpNm, + panelInfoShowId: panelInfo.showId, + showDetailInfoLength: showDetailInfo?.length, + showDetailInfoId: showDetailInfo?.[0]?.showId, + }); + if (panelInfo.shptmBanrTpNm === 'VOD' && showDetailInfo && showDetailInfo.length > 0) { + console.log('[PlayerPanel] VOD 조건 만족'); // 현재 panelInfo의 showId와 showDetailInfo의 showId가 일치할 때만 처리 if (showDetailInfo[0]?.showId === panelInfo.showId) { + console.log('[PlayerPanel] showId 일치! 동영상 설정 시작', { + showId: showDetailInfo[0]?.showId, + patnrId: showDetailInfo[0]?.patnrId, + }); + if (showDetailInfo[0]?.showCatCd && fullVideolgCatCd !== showDetailInfo[0]?.showCatCd) { dispatch( getHomeFullVideoInfo({ @@ -1421,16 +1434,19 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props ); } if (showDetailInfo[0].showId && showDetailInfo[0].patnrId) { - if (!featuredShowsInfos || Object.keys(featuredShowsInfos).length === 0) { - setPlayListInfo(showDetailInfo); - // VOD는 단일 비디오이므로 selectedIndex를 0으로 고정 - setSelectedIndex(0); - } + console.log('[PlayerPanel] setPlayListInfo 호출'); + setPlayListInfo(showDetailInfo); + // VOD는 단일 비디오이므로 selectedIndex를 0으로 고정 + setSelectedIndex(0); setShopNowInfo(showDetailInfo[0].productInfos); saveToLocalSettings(showDetailInfo[0].showId, showDetailInfo[0].patnrId); } } else { // showId가 일치하지 않으면 이전 상태를 재활용하지 않고 초기화 + console.log('[PlayerPanel] VOD showDetailInfo mismatch. Clearing playListInfo.', { + panelInfoShowId: panelInfo.showId, + showDetailInfoId: showDetailInfo[0]?.showId, + }); dlog('[PlayerPanel] VOD showDetailInfo mismatch. Clearing playListInfo.', { panelInfoShowId: panelInfo.showId, showDetailInfoId: showDetailInfo[0]?.showId, diff --git a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/FeaturedShowContents.jsx b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/FeaturedShowContents.jsx index 36c0d199..886914d2 100644 --- a/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/FeaturedShowContents.jsx +++ b/com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/FeaturedShowContents.jsx @@ -78,6 +78,14 @@ export default function FeaturedShowContents({ } = featuredShowsInfos[index]; const handleItemClick = () => { + console.log('[FeaturedShowContents] 클릭 발생', { + index, + showId, + showNm, + patnrId, + currentVideoShowId, + }); + const params = { tabTitle: tabTitle[tabIndex], showId: showId, @@ -91,6 +99,7 @@ export default function FeaturedShowContents({ dispatch(sendLogTotalRecommend(params)); //중복클릭방지 if (isClickBlocked.current) { + console.log('[FeaturedShowContents] 중복 클릭 방지됨'); return; } @@ -107,16 +116,39 @@ export default function FeaturedShowContents({ }, 600); if (currentVideoShowId && currentVideoShowId === showId) { + console.log('[FeaturedShowContents] 동일한 showId로 클릭됨, 무시'); return; } + console.log('[FeaturedShowContents] getMainCategoryShowDetail + updatePanel 호출', { + showId, + patnrId, + lgCatCd, + }); + setSelectedIndex(index); + + // getMainCategoryShowDetail을 먼저 호출해서 showDetailInfo를 업데이트 dispatch( getMainCategoryShowDetail({ patnrId: patnrId, showId: showId, }) ); + + // 그 다음 updatePanel 호출해서 panelInfo 업데이트 + dispatch( + updatePanel({ + name: panel_names.PLAYER_PANEL, + panelInfo: { + patnrId: patnrId, + showId: showId, + shptmBanrTpNm: 'VOD', + lgCatCd: lgCatCd, + isUpdatedByClick: true, + }, + }) + ); }; const showNameDangerouslySetInnerHTML = () => {