shoptime live, vod, media 시청및종료시 정보수집

This commit is contained in:
Dev TWIN0906
2025-05-12 17:36:52 +09:00
parent 84bc71f5b0
commit c78896903b
4 changed files with 67 additions and 21 deletions

View File

@@ -2,7 +2,7 @@
import { URLS } from "../api/apiConfig";
import { TAxios } from "../api/TAxios";
import { convertUtcToLocal } from "../components/MediaPlayer/util";
import { CATEGORY_DATA_MAX_RESULTS_LIMIT } from "../utils/Config";
import { CATEGORY_DATA_MAX_RESULTS_LIMIT, LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from "../utils/Config";
import * as HelperMethods from "../utils/helperMethods";
import { types } from "./actionTypes";
import {
@@ -10,8 +10,6 @@ import {
changeAppStatus,
deleteReservation,
} from "./commonActions";
import { sendLogTotalRecommend } from "./logActions";
export const getMainLiveShow = (props) => (dispatch, getState) => {
@@ -145,28 +143,18 @@ export const getMainCategoryDetail = (props) => (dispatch, getState) => {
);
};
// 영상 상세 보기 조회 LF-LGSP-047
export const getMainCategoryShowDetail = (props) => (dispatch, getState) => {
const { patnrId, showId, curationId } = props;
const onSuccess = (response) => {
console.log("getMainCategoryShowDetail onSuccess ", response.data);
console.log("#메인카테고리쇼 영상시청", props);
const showInfos = response.data.data.showInfos;
dispatch(sendLogTotalRecommend({
visible: 'true',
showType: "",
player: "",
contentId:showId,
contentTitle:showInfos[0].showNm,
partner:showInfos[0].patncNm,
brand:showInfos[0].productInfos[0]?.brandNm,
category:showInfos[0].showCatNm,
}))
dispatch({
type: types.GET_MAIN_CATEGORY_SHOW_DETAIL,
payload: response.data.data,
});
};
const onFail = (error) => {
@@ -404,11 +392,12 @@ export const getHomeFullVideoInfo =
(dispatch, getState) => {
const onSuccess = (response) => {
console.log("getHomeFullVideoInfo onSuccess", response.data.data.showInfos);
console.log("#홈풀비디오 영상시청");
dispatch({
type: types.GET_HOME_FULL_VIDEO_INFO,
payload: { data: response.data.data, lgCatCd },
});
};
const onFail = (error) => {
@@ -433,11 +422,12 @@ export const getMainLiveShowNowProduct =
(dispatch, getState) => {
const onSuccess = (response) => {
console.log("getMainLiveShowNowProduct onSuccess", response.data);
console.log("#메인라이브쇼 영상시청");
dispatch({
type: types.GET_MAIN_LIVE_SHOW_NOW_PRODUCT,
payload: response.data.data,
});
};
const onFail = (error) => {
@@ -457,8 +447,6 @@ export const getMainLiveShowNowProduct =
};
export const clearShopNowInfo = () => {
console.log("#영상시청 종료");
return {
type: types.CLEAR_SHOPNOW_INFO,
};

View File

@@ -587,6 +587,7 @@ export const LOG_CONTEXT_NAME = {
CHECKOUT: "shoptime.checkout",
PINCODE: "shoptime.pincode",
YOUMAYLIKE: "shoptime.youmayalsolike",
SHOW: "shoptime.show",
};
export const LOG_MESSAGE_ID = {
@@ -594,4 +595,5 @@ export const LOG_MESSAGE_ID = {
BANNER: "AL_BANNER_SHOWN",
PINCODE: "AL_PINCODE_BUTTON",
CONTENTCLICK: "AL_PAGE_CONTENT_CLICK",
SHOWVIEW: "AL_SHOW_VIEW_CHANGE",
};

View File

@@ -29,7 +29,7 @@ import { SpotlightIds } from "../../../utils/SpotlightIds";
import css from "./YouMayLike.module.less";
import { sendLogTotalRecommend } from "../../../actions/logActions";
import * as Config from "../../../utils/Config";
import usePriceInfo from "../../../hooks/usePriceInfo";
const Container = SpotlightContainerDecorator(
{ enterTo: "default-element" },

View File

@@ -26,6 +26,7 @@ import {
import {
sendLogGNB,
sendLogLive,
sendLogTotalRecommend,
sendLogVOD,
} from '../../actions/logActions';
import {
@@ -233,6 +234,7 @@ const PlayerPanel = ({
const panels = USE_SELECTOR("panels", (state) => state.panels.panels);
const chatData = USE_SELECTOR("chatData", (state) => state.play.chatData);
const popupVisible = USE_SELECTOR(
"popupVisible",
(state) => state.common.popup.popupVisible
@@ -1010,6 +1012,8 @@ const PlayerPanel = ({
panelInfo.modal,
panelInfo.isUpdatedByClick,
panelInfo.isIndicatorByClick,
panelInfo.shptmBanrTpNm,
]);
@@ -1978,6 +1982,58 @@ const PlayerPanel = ({
}
}, [panelInfo.thumbnail, broadcast]);
const isPlayer = useMemo(() => {
if (!panelInfo.modal) {
return 'full player';
}
else {
switch (panels[0].name) {
case 'categorypanel':
return 'category';
case 'mypagepanel':
return 'my page';
case 'searchpanel':
return 'search';
case 'hotpickpanel':
return 'hot picks';
case 'featuredbrandspanel':
return 'featured brands';
case 'trendingnowpanel':
return 'trending now';
case 'playerpanel':
return 'home';
}
}
}, [panelInfo.modal, panels]);
useEffect(() => {
const brandArray = showDetailInfo?.[0]?.productInfos?.map(item => item.brndNm) || [];
const categoryArray = showDetailInfo?.[0]?.productInfos?.map(item => item.catNm) || [];
const params = {
visible: 'true',
showType: panelInfo.shptmBanrTpNm,
player: isPlayer,
contentId: showDetailInfo?.[0]?.showId || '',
contentTitle: showDetailInfo?.[0]?.showNm || '',
partner: showDetailInfo?.[0]?.patncNm || '',
brand: brandArray.join('|') || null,
category: categoryArray.join('|') || null,
contextName: Config.LOG_CONTEXT_NAME.SHOW,
messageId: Config.LOG_MESSAGE_ID.SHOWVIEW
};
dispatch(sendLogTotalRecommend(params));
return () => {
const unmountParams = {
...params,
visible: 'false'
};
dispatch(sendLogTotalRecommend(unmountParams));
};
}, [panelInfo?.shptmBanrTpNm, showDetailInfo, isPlayer]);
return (
<TPanel
isTabActivated={false}