|
|
|
|
@@ -1,7 +1,14 @@
|
|
|
|
|
import { useDispatch } from "react-redux";
|
|
|
|
|
import { updateHomeInfo } from "../actions/homeActions";
|
|
|
|
|
import { pushPanel } from "../actions/panelActions";
|
|
|
|
|
import { LOG_MENU, panel_names } from "../utils/Config";
|
|
|
|
|
import {
|
|
|
|
|
LOG_CONTEXT_NAME,
|
|
|
|
|
LOG_MENU,
|
|
|
|
|
LOG_MESSAGE_ID,
|
|
|
|
|
panel_names,
|
|
|
|
|
} from "../utils/Config";
|
|
|
|
|
import { SpotlightIds } from "../utils/SpotlightIds";
|
|
|
|
|
import { sendLogTotalRecommend } from "../actions/logActions";
|
|
|
|
|
|
|
|
|
|
//V2_진입경로코드_진입경로명_MT_노출순번
|
|
|
|
|
export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
@@ -33,6 +40,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
type = tokens[3];
|
|
|
|
|
|
|
|
|
|
let panelName = "";
|
|
|
|
|
let deeplinkPanel = "";
|
|
|
|
|
let panelInfo = {};
|
|
|
|
|
|
|
|
|
|
if (tokens[0] === "V2") {
|
|
|
|
|
@@ -50,6 +58,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
// "MT": Main TOP
|
|
|
|
|
// V3_진입경로코드_진입경로명_MT_노출순번
|
|
|
|
|
panelName = panel_names.HOME_PANEL;
|
|
|
|
|
deeplinkPanel = "Main TOP";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "PD":
|
|
|
|
|
@@ -60,6 +69,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
expsOrd = tokens[6]; // 노출순번
|
|
|
|
|
curationId = tokens[7]; // 큐레이션아이디
|
|
|
|
|
panelName = panel_names.DETAIL_PANEL;
|
|
|
|
|
deeplinkPanel = "Product Detaoil";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
prdtId: prdtId,
|
|
|
|
|
@@ -75,6 +85,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
expsOrd = tokens[6]; // 노출순번
|
|
|
|
|
curationId = tokens[7]; // 큐레이션아이디
|
|
|
|
|
panelName = panel_names.PLAYER_PANEL;
|
|
|
|
|
deeplinkPanel = "Live Show";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
chanId: chanId,
|
|
|
|
|
@@ -91,6 +102,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
expsOrd = tokens[6]; // 노출순번
|
|
|
|
|
curationId = tokens[7]; // 큐레이션아이디
|
|
|
|
|
panelName = panel_names.PLAYER_PANEL;
|
|
|
|
|
deeplinkPanel = "VOD Show";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
showId: showId,
|
|
|
|
|
@@ -111,6 +123,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
expsOrd = tokens[7]; // 노출순번
|
|
|
|
|
grNumber = tokens[8]; // 그룹번호
|
|
|
|
|
panelName = panel_names.DETAIL_PANEL;
|
|
|
|
|
deeplinkPanel = "Theme Detail";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
curationId: curationId,
|
|
|
|
|
@@ -125,10 +138,12 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
case "HD":
|
|
|
|
|
// "HD": Hotel Detail
|
|
|
|
|
// V3_진입경로코드_진입경로명_HD_파트너아이디_큐레이션아이디_노출순번
|
|
|
|
|
|
|
|
|
|
patnrId = tokens[4]; // 파트너아이디
|
|
|
|
|
curationId = tokens[5]; // 큐레이션아이디
|
|
|
|
|
expsOrd = tokens[6]; // 노출순번
|
|
|
|
|
panelName = panel_names.DETAIL_PANEL;
|
|
|
|
|
deeplinkPanel = "Hotel Detail";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
curationId: curationId,
|
|
|
|
|
@@ -140,10 +155,12 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
case "HP":
|
|
|
|
|
// "HP": Hot Picks
|
|
|
|
|
// V3_진입경로코드_진입경로명_HP_파트너아이디_큐레이션아이디_노출순번
|
|
|
|
|
|
|
|
|
|
patnrId = tokens[4]; // 파트너아이디
|
|
|
|
|
curationId = tokens[5]; // 큐레이션아이디
|
|
|
|
|
expsOrd = tokens[6]; // 노출순번
|
|
|
|
|
panelName = panel_names.HOT_PICKS_PANEL;
|
|
|
|
|
deeplinkPanel = "Hot Picks";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
curationId: curationId,
|
|
|
|
|
@@ -156,6 +173,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
// V3_진입경로코드_진입경로명_WE_이벤트아이디
|
|
|
|
|
evntId = tokens[4]; // 이벤트아이디
|
|
|
|
|
panelName = panel_names.WELCOME_EVENT_PANEL;
|
|
|
|
|
deeplinkPanel = "Welcome Event";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
evntId: evntId,
|
|
|
|
|
};
|
|
|
|
|
@@ -167,6 +185,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
lgCatCd = tokens[4]; // LG카테고리Code
|
|
|
|
|
lgCatNm = tokens[5]; // 서브카테고리명
|
|
|
|
|
panelName = panel_names.ON_SALE_PANEL;
|
|
|
|
|
deeplinkPanel = "On Sale";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
lgCatCd: lgCatCd,
|
|
|
|
|
lgCatNm: lgCatNm,
|
|
|
|
|
@@ -177,16 +196,19 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
// "BS": Best Sellers
|
|
|
|
|
// V3_진입경로코드_진입경로명_BS
|
|
|
|
|
panelName = panel_names.TRENDING_NOW_PANEL;
|
|
|
|
|
deeplinkPanel = "Best Sellers";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
pageName: "BS",
|
|
|
|
|
focusedContainerId: SpotlightIds.TRENDING_NOW_BEST_SELLER,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "PS":
|
|
|
|
|
// "PS": Popular Shows
|
|
|
|
|
// V3_진입경로코드_진입경로명_PS_노출순번
|
|
|
|
|
panelName = panel_names.TRENDING_NOW_PANEL;
|
|
|
|
|
deeplinkPanel = "Popular Shows";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
pageName: "PS",
|
|
|
|
|
focusedContainerId: SpotlightIds.TRENDING_NOW_POPULAR_SHOW,
|
|
|
|
|
@@ -201,7 +223,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
lgCatNm = tokens[5]; // 서브카테고리명
|
|
|
|
|
tabType = tokens[6].toLowerCase(); // 컨텐츠타입
|
|
|
|
|
panelName = panel_names.CATEGORY_PANEL;
|
|
|
|
|
|
|
|
|
|
deeplinkPanel = "Sub Category";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
lgCatCd: lgCatCd,
|
|
|
|
|
lgCatNm: lgCatNm,
|
|
|
|
|
@@ -214,6 +236,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
// V3_진입경로코드_진입경로명_FB_파트너아이디_노출순번
|
|
|
|
|
patnrId = tokens[4]; // 파트너아이디
|
|
|
|
|
panelName = panel_names.FEATURED_BRANDS_PANEL;
|
|
|
|
|
deeplinkPanel = "Featured Brands";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
patnrId: patnrId,
|
|
|
|
|
};
|
|
|
|
|
@@ -222,6 +245,7 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
case "TM":
|
|
|
|
|
curationId = tokens[4]; // 큐레이션 아이디
|
|
|
|
|
panelName = panel_names.THEME_CURATION_PANEL;
|
|
|
|
|
deeplinkPanel = "THEME MENU";
|
|
|
|
|
panelInfo = {
|
|
|
|
|
curationId: curationId,
|
|
|
|
|
};
|
|
|
|
|
@@ -236,6 +260,16 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
|
|
|
|
|
// break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dispatch(
|
|
|
|
|
sendLogTotalRecommend({
|
|
|
|
|
contextName: LOG_CONTEXT_NAME.ENTRY,
|
|
|
|
|
messageId: LOG_MESSAGE_ID.ENTRY_INFO,
|
|
|
|
|
deeplink: deeplinkPanel,
|
|
|
|
|
curationId: curationId ? curationId : showId,
|
|
|
|
|
productId: prdtId,
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (panelName) {
|
|
|
|
|
const action =
|
|
|
|
|
panelName === panel_names.HOME_PANEL ? updateHomeInfo : pushPanel;
|
|
|
|
|
|