youmayalsolike api log 추가
This commit is contained in:
@@ -245,33 +245,31 @@ export const getSubCategory =
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const continueGetSubCategory =
|
export const continueGetSubCategory = (key, pageNo) => (dispatch, getState) => {
|
||||||
(key, pageNo) =>
|
if (!lastSubCategoryParams) {
|
||||||
(dispatch, getState) => {
|
console.warn("No previous category parameters found");
|
||||||
if (!lastSubCategoryParams) {
|
return;
|
||||||
console.warn("No previous category parameters found");
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const subCategoryData = getState().main.subCategoryData;
|
const subCategoryData = getState().main.subCategoryData;
|
||||||
const targetData =
|
const targetData =
|
||||||
subCategoryData[key]?.subCatItemList ||
|
subCategoryData[key]?.subCatItemList ||
|
||||||
subCategoryData[key]?.subCatShowList ||
|
subCategoryData[key]?.subCatShowList ||
|
||||||
[];
|
[];
|
||||||
const totalCount = subCategoryData[key]?.total ?? 0;
|
const totalCount = subCategoryData[key]?.total ?? 0;
|
||||||
const startIndex = CATEGORY_DATA_MAX_RESULTS_LIMIT * (pageNo - 1);
|
const startIndex = CATEGORY_DATA_MAX_RESULTS_LIMIT * (pageNo - 1);
|
||||||
if (
|
if (
|
||||||
(startIndex <= 1 && !targetData) ||
|
(startIndex <= 1 && !targetData) ||
|
||||||
startIndex < targetData.length ||
|
startIndex < targetData.length ||
|
||||||
(totalCount -1) <= startIndex
|
totalCount - 1 <= startIndex
|
||||||
) {
|
) {
|
||||||
//ignore query
|
//ignore query
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dispatch(
|
dispatch(
|
||||||
getSubCategory({ ...lastSubCategoryParams }, pageNo, getSubCategoryKey)
|
getSubCategory({ ...lastSubCategoryParams }, pageNo, getSubCategoryKey)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clearSubCategory = () => ({
|
const clearSubCategory = () => ({
|
||||||
type: types.CLEAR_SUB_CATEGORY,
|
type: types.CLEAR_SUB_CATEGORY,
|
||||||
@@ -308,7 +306,7 @@ export const getTop20Show = () => (dispatch, getState) => {
|
|||||||
|
|
||||||
// 유메이라이크 아이템 리스트 IF-LGSP-201
|
// 유메이라이크 아이템 리스트 IF-LGSP-201
|
||||||
export const getMainYouMayLike =
|
export const getMainYouMayLike =
|
||||||
({ lgCatCd, exclCurationId, exclPatnrId, exclPrdtId }) =>
|
({ lgCatCd, exclCurationId, exclPatnrId, exclPrdtId, catDpTh3, catDpTh4 }) =>
|
||||||
(dispatch, getState) => {
|
(dispatch, getState) => {
|
||||||
const onSuccess = (response) => {
|
const onSuccess = (response) => {
|
||||||
console.log("getMainYouMayLike onSuccess ", response.data);
|
console.log("getMainYouMayLike onSuccess ", response.data);
|
||||||
@@ -328,7 +326,7 @@ export const getMainYouMayLike =
|
|||||||
getState,
|
getState,
|
||||||
"get",
|
"get",
|
||||||
URLS.GET_YOUMAYLIKE,
|
URLS.GET_YOUMAYLIKE,
|
||||||
{ lgCatCd, exclCurationId, exclPatnrId, exclPrdtId },
|
{ lgCatCd, catDpTh3, catDpTh4, exclCurationId, exclPatnrId, exclPrdtId },
|
||||||
{},
|
{},
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onFail
|
onFail
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
exclCurationId: panelInfo?.curationId,
|
exclCurationId: panelInfo?.curationId,
|
||||||
exclPatnrId: panelInfo?.patnrId,
|
exclPatnrId: panelInfo?.patnrId,
|
||||||
exclPrdtId: panelInfo?.prdtId,
|
exclPrdtId: panelInfo?.prdtId,
|
||||||
|
catDpTh3: productData?.catDpTh3,
|
||||||
|
catDpTh4: productData?.catDpTh4,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export default function TabContainer({
|
|||||||
: $L("FEATURED SHOWS"),
|
: $L("FEATURED SHOWS"),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// console.log("###liveChannelInfos", liveChannelInfos[selectedIndex]);
|
||||||
const handleItemClick = useCallback(
|
const handleItemClick = useCallback(
|
||||||
({ index }) => {
|
({ index }) => {
|
||||||
if (index === tab) return;
|
if (index === tab) return;
|
||||||
@@ -101,7 +102,6 @@ export default function TabContainer({
|
|||||||
},
|
},
|
||||||
[videoVerticalVisible]
|
[videoVerticalVisible]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
className={classNames(
|
className={classNames(
|
||||||
@@ -121,7 +121,7 @@ export default function TabContainer({
|
|||||||
|
|
||||||
{tab === 0 && (
|
{tab === 0 && (
|
||||||
<ShopNowContents
|
<ShopNowContents
|
||||||
tabTitle = {tabList}
|
tabTitle={tabList}
|
||||||
shopNowInfo={shopNowInfo}
|
shopNowInfo={shopNowInfo}
|
||||||
playListInfo={playListInfo && playListInfo[selectedIndex]}
|
playListInfo={playListInfo && playListInfo[selectedIndex]}
|
||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
@@ -132,7 +132,7 @@ export default function TabContainer({
|
|||||||
)}
|
)}
|
||||||
{panelInfo?.shptmBanrTpNm === "VOD" && tab === 1 && (
|
{panelInfo?.shptmBanrTpNm === "VOD" && tab === 1 && (
|
||||||
<FeaturedShowContents
|
<FeaturedShowContents
|
||||||
tabTitle = {tabList}
|
tabTitle={tabList}
|
||||||
featuredShowsInfos={playListInfo}
|
featuredShowsInfos={playListInfo}
|
||||||
currentVideoInfo={playListInfo[selectedIndex]}
|
currentVideoInfo={playListInfo[selectedIndex]}
|
||||||
setSelectedIndex={setSelectedIndex}
|
setSelectedIndex={setSelectedIndex}
|
||||||
@@ -146,7 +146,7 @@ export default function TabContainer({
|
|||||||
)}
|
)}
|
||||||
{panelInfo?.shptmBanrTpNm === "LIVE" && tab === 1 && liveChannelInfos && (
|
{panelInfo?.shptmBanrTpNm === "LIVE" && tab === 1 && liveChannelInfos && (
|
||||||
<LiveChannelContents
|
<LiveChannelContents
|
||||||
tabTitle = {tabList}
|
tabTitle={tabList}
|
||||||
selectedIndex={selectedIndex}
|
selectedIndex={selectedIndex}
|
||||||
setSelectedIndex={setSelectedIndex}
|
setSelectedIndex={setSelectedIndex}
|
||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export default function YouMayLikeContents({
|
|||||||
const youmaylikeInfos = useSelector((state) => state.main.youmaylikeInfos);
|
const youmaylikeInfos = useSelector((state) => state.main.youmaylikeInfos);
|
||||||
|
|
||||||
const gridStyle = useMemo(() => ({ height: `${height}px` }), [height]);
|
const gridStyle = useMemo(() => ({ height: `${height}px` }), [height]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (shopNowInfo && shopNowInfo.length === 2) {
|
if (shopNowInfo && shopNowInfo.length === 2) {
|
||||||
setHeight(scaleH(300));
|
setHeight(scaleH(300));
|
||||||
@@ -52,6 +51,8 @@ export default function YouMayLikeContents({
|
|||||||
showNm: playListInfo?.showNm,
|
showNm: playListInfo?.showNm,
|
||||||
showId: playListInfo?.showId,
|
showId: playListInfo?.showId,
|
||||||
liveFlag: playListInfo?.liveFlag,
|
liveFlag: playListInfo?.liveFlag,
|
||||||
|
catDpTh3: playListInfo?.catDpTh3,
|
||||||
|
catDpTh4: playListInfo?.catDpTh4,
|
||||||
patnrId,
|
patnrId,
|
||||||
prdtId,
|
prdtId,
|
||||||
launchedFromPlayer: true,
|
launchedFromPlayer: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user