yomaylike 요청 수정
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
import { URLS } from "../api/apiConfig";
|
||||
import { TAxios } from "../api/TAxios";
|
||||
import { convertUtcToLocal } from "../components/MediaPlayer/util";
|
||||
@@ -9,8 +10,12 @@ import {
|
||||
changeAppStatus,
|
||||
deleteReservation,
|
||||
} from "./commonActions";
|
||||
import { sendLogTotalRecommend } from "./logActions";
|
||||
|
||||
|
||||
|
||||
export const getMainLiveShow = (props) => (dispatch, getState) => {
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getMainLiveShow onSuccess", response.data);
|
||||
|
||||
@@ -144,8 +149,20 @@ export const getMainCategoryDetail = (props) => (dispatch, getState) => {
|
||||
export const getMainCategoryShowDetail = (props) => (dispatch, getState) => {
|
||||
const { patnrId, showId, curationId } = props;
|
||||
const onSuccess = (response) => {
|
||||
console.log("getMainCategoryShowDetail onSuccess ", response.data);
|
||||
|
||||
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,
|
||||
@@ -386,8 +403,8 @@ export const getHomeFullVideoInfo =
|
||||
({ lgCatCd }) =>
|
||||
(dispatch, getState) => {
|
||||
const onSuccess = (response) => {
|
||||
console.log("getHomeFullVideoInfo onSuccess", response.data);
|
||||
|
||||
console.log("getHomeFullVideoInfo onSuccess", response.data.data.showInfos);
|
||||
console.log("#홈풀비디오 영상시청");
|
||||
dispatch({
|
||||
type: types.GET_HOME_FULL_VIDEO_INFO,
|
||||
payload: { data: response.data.data, lgCatCd },
|
||||
@@ -416,7 +433,7 @@ 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,
|
||||
@@ -438,6 +455,11 @@ export const getMainLiveShowNowProduct =
|
||||
onFail
|
||||
);
|
||||
};
|
||||
export const clearShopNowInfo = () => ({
|
||||
|
||||
export const clearShopNowInfo = () => {
|
||||
console.log("#영상시청 종료");
|
||||
|
||||
return {
|
||||
type: types.CLEAR_SHOPNOW_INFO,
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -584,9 +584,14 @@ export const ERROR_MESSAGES_GROUPS = [
|
||||
|
||||
export const LOG_CONTEXT_NAME = {
|
||||
HOME: "shoptime.home",
|
||||
CHECKOUT: "shoptime.checkout",
|
||||
PINCODE: "shoptime.pincode",
|
||||
YOUMAYLIKE: "shoptime.youmayalsolike",
|
||||
};
|
||||
|
||||
export const LOG_MESSAGE_ID = {
|
||||
HOME: "AL_HOME_SHOWN",
|
||||
BANNER: "AL_BANNER_SHOWN",
|
||||
PINCODE: "AL_PINCODE_BUTTON",
|
||||
CONTENTCLICK: "AL_PAGE_CONTENT_CLICK",
|
||||
};
|
||||
|
||||
@@ -203,7 +203,9 @@ export default function CheckOutPanel({ panelInfo }) {
|
||||
dispatch(sendLogCheckOutBtnClick({ btnNm: "ORDER ITEMS" }));
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle: "ORDER ITEMS",
|
||||
buttonId: "checkout_order_items_view"
|
||||
buttonId: "checkout_order_items_view",
|
||||
contextName: Config.LOG_CONTEXT_NAME.CHECKOUT,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}));
|
||||
console.log('oder items')
|
||||
}
|
||||
@@ -217,7 +219,9 @@ export default function CheckOutPanel({ panelInfo }) {
|
||||
dispatch(sendLogCheckOutBtnClick({ btnNm: "OFFERS & PROMOTION" }));
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle: "OFFERS & PROMOTION",
|
||||
buttonId: "checkout_offers_promotion_view"
|
||||
buttonId: "checkout_offers_promotion_view",
|
||||
contextName: Config.LOG_CONTEXT_NAME.CHECKOUT,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -248,7 +252,9 @@ export default function CheckOutPanel({ panelInfo }) {
|
||||
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle: selectedTerms.termsTypeName,
|
||||
buttonId: `checkout_terms_${selectedTerms.termsTypeName.toLowerCase().replace(/\s+/g, '_')}`
|
||||
buttonId: `checkout_terms_${selectedTerms.termsTypeName.toLowerCase().replace(/\s+/g, '_')}`,
|
||||
contextName: Config.LOG_CONTEXT_NAME.CHECKOUT,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}))
|
||||
setCurrentTerms(selectedTerms);
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.termsPopup));
|
||||
|
||||
@@ -170,7 +170,11 @@ export default function PinCodeInput({
|
||||
|
||||
const onClickForgetPinCode = useCallback(() => {
|
||||
setPin(["", "", "", ""]);
|
||||
dispatch(sendLogTotalRecommend({buttonTitle:"ForgetPINcode"}))
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle:"ForgetPINcode",
|
||||
contextName:Config.LOG_CONTEXT_NAME.PINCODE,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}))
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup2));
|
||||
}, [dispatch]);
|
||||
|
||||
@@ -179,7 +183,11 @@ export default function PinCodeInput({
|
||||
setErrorMsg($L("Please enter a PIN CODE."));
|
||||
return;
|
||||
}
|
||||
dispatch(sendLogTotalRecommend({buttonTitle:"OK"}))
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle:"OK",
|
||||
contextName:Config.LOG_CONTEXT_NAME.PINCODE,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}))
|
||||
setOkClicked(true);
|
||||
|
||||
const pinString = pin.join("");
|
||||
|
||||
@@ -146,7 +146,9 @@ export default function InformationContainer({
|
||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle: `${btnNm} ADD/EDIT`,
|
||||
buttonId: `checkout_info_${btnNm.toLowerCase().replace(/\s+/g, '_')}`
|
||||
buttonId: `checkout_info_${btnNm.toLowerCase().replace(/\s+/g, '_')}`,
|
||||
contextName:Config.LOG_CONTEXT_NAME.CHECKOUT,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}))
|
||||
|
||||
},
|
||||
|
||||
@@ -105,7 +105,9 @@ export default function SummaryContainer({
|
||||
}
|
||||
dispatch(sendLogTotalRecommend({
|
||||
buttonTitle: "PLACE ORDER",
|
||||
buttonId: "checkout_place_order_view"
|
||||
buttonId: "checkout_place_order_view",
|
||||
contextName: Config.LOG_CONTEXT_NAME.CHECKOUT,
|
||||
messageId: Config.LOG_MESSAGE_ID.PINCODE
|
||||
}))
|
||||
|
||||
setPlaceOrderPopup(true);
|
||||
|
||||
@@ -28,6 +28,8 @@ import { $L } from "../../../utils/helperMethods";
|
||||
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" },
|
||||
@@ -55,6 +57,9 @@ export default memo(function YouMayLike({
|
||||
const themeProductInfos = useSelector(
|
||||
(state) => state.home.themeCurationDetailInfoData
|
||||
);
|
||||
|
||||
|
||||
|
||||
const cursorOpen = useRef(new Job((func) => func(), 1000));
|
||||
|
||||
const launchedFromPlayer = useMemo(() => {
|
||||
@@ -124,23 +129,29 @@ export default memo(function YouMayLike({
|
||||
setExpanded((prev) => !prev);
|
||||
}, []);
|
||||
|
||||
|
||||
const renderItem = useCallback(
|
||||
({ index, ...rest }) => {
|
||||
const { imgUrl, patnrId, prdtId, prdtNm, priceInfo, offerInfo, price3, catNm, price2, brandNm} =
|
||||
const { imgUrl, patnrId, prdtId, prdtNm, priceInfo, offerInfo, patncNm, brndNm, lgCatCd} =
|
||||
youmaylikeData[index];
|
||||
const handleItemClick = () => {
|
||||
|
||||
const handleItemClick = () => {
|
||||
console.log('priceInfo', priceInfo);
|
||||
const splittedPriceInfo = priceInfo.split("|").map((item) => item.trim());
|
||||
const discountRate = splittedPriceInfo[4];
|
||||
const logParams = {
|
||||
productId: productInfo?.prdtId,
|
||||
productTitle:productInfo?.prdtNm,
|
||||
category: productInfo?.catNm,
|
||||
nowProductId: prdtId,
|
||||
nowProductTitle: prdtNm,
|
||||
nowCategory: catNm,
|
||||
discount: price3,
|
||||
price: price2, //할인가
|
||||
partner: patnrId,
|
||||
brand: brandNm
|
||||
productId: patnrId,
|
||||
productTitle: prdtNm,
|
||||
category: lgCatCd,
|
||||
nowProductId: productInfo?.prdtId,
|
||||
nowProductTitle: productInfo?.prdtNm,
|
||||
nowCategory: productInfo?.catNm,
|
||||
discount: discountRate,
|
||||
price: priceInfo,
|
||||
partner: patncNm,
|
||||
brand: brndNm,
|
||||
contextName: Config.LOG_CONTEXT_NAME.YOUMAYLIKE,
|
||||
messageId: Config.LOG_MESSAGE_ID.CONTENTCLICK
|
||||
};
|
||||
setExpanded(false);
|
||||
setSelectedIndex(0);
|
||||
@@ -149,8 +160,7 @@ export default memo(function YouMayLike({
|
||||
dispatch(
|
||||
sendLogTotalRecommend(logParams)
|
||||
);
|
||||
console.log(logParams)
|
||||
|
||||
console.log(logParams);
|
||||
|
||||
setContainerLastFocusedElement(null, ["indicator-GridListContainer"]);
|
||||
if (themeProductInfos && themeProductInfos.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user