From e9749091f8e3f84c4d13135f85e959179bc11ca4 Mon Sep 17 00:00:00 2001 From: dongyoungKo Date: Fri, 16 May 2025 16:58:23 +0900 Subject: [PATCH] =?UTF-8?q?[=ED=86=B5=ED=95=A9=EB=A1=9C=EA=B7=B8=20No.5]?= =?UTF-8?q?=20onsale=20=EC=83=81=ED=92=88=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TItemCard/TItemCard.jsx | 4 +-- .../views/HomePanel/BestSeller/BestSeller.jsx | 2 +- .../views/HomePanel/HomeOnSale/HomeOnSale.jsx | 15 +++++++++ .../HomeOnSaleItem/HomeOnSaleItem.jsx | 33 ++++++++++++++++++- .../HomePanel/SubCategory/SubCategory.jsx | 2 +- 5 files changed, 51 insertions(+), 5 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx index 2ab33ef9..a234f29a 100644 --- a/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx +++ b/com.twin.app.shoptime/src/components/TItemCard/TItemCard.jsx @@ -67,7 +67,7 @@ export default memo(function TItemCard({ lastLabel, contextName, messageId, - location, + order, patnerName, brandName, shelfId, @@ -125,7 +125,7 @@ export default memo(function TItemCard({ brand: brandName, price: originalPrice, discount: discountRate, - locaiton: location, + locaiton: order, category: catNm, }; dispatch(sendLogTotalRecommend(params)); diff --git a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx index 9559a69e..4371825a 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx @@ -202,7 +202,7 @@ const BestSeller = ({ key={"subItem" + itemIndex} contextName={LOG_CONTEXT_NAME.HOME} messageId={LOG_MESSAGE_ID.SHELF_CLICK} - location={itemIndex + 1} + order={itemIndex + 1} shelfId={spotlightId} shelfLocation={shelfLocation} shelfTitle={shelfTitle} diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx index 1618647a..65dffc3e 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSale.jsx @@ -12,6 +12,7 @@ import useScrollTo from "../../../hooks/useScrollTo"; import { $L, scaleW } from "../../../utils/helperMethods"; import css from "./HomeOnSale.module.less"; import HomeOnSaleItem from "./HomeOnSaleItem/HomeOnSaleItem"; +import { LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from "../../../utils/Config"; const Container = SpotlightContainerDecorator( { enterTo: "last-focused" }, @@ -24,6 +25,8 @@ const HomeOnSale = ({ handleItemFocus, handleShelfFocus, spotlightId, + shelfLocation, + shelfTitle, ...rest }) => { const [firstChk, setFirstChk] = useState(0); @@ -120,6 +123,7 @@ const HomeOnSale = ({ } }, [handleShelfFocus]); + // console.log("#homeOnSaleInfos", homeOnSaleInfos); return ( ); })} diff --git a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSaleItem/HomeOnSaleItem.jsx b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSaleItem/HomeOnSaleItem.jsx index bef19acc..636e9e36 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSaleItem/HomeOnSaleItem.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/HomeOnSale/HomeOnSaleItem/HomeOnSaleItem.jsx @@ -11,6 +11,7 @@ import usePriceInfo from "../../../../hooks/usePriceInfo"; import { panel_names } from "../../../../utils/Config"; import { $L } from "../../../../utils/helperMethods"; import css from "./HomeOnSaleItem.module.less"; +import { sendLogTotalRecommend } from "../../../../actions/logActions"; const SpottableComponent = Spottable("div"); @@ -19,6 +20,17 @@ export default function HomeOnSaleItem({ itemData, label, lastLabel, + contextName, + messageId, + shelfLocation, + shelfId, + shelfTitle, + productId, + productName, + patnerName, + brandName, + catNm, + order, ...rest }) { const { originalPrice, discountedPrice, discountRate } = @@ -39,8 +51,27 @@ export default function HomeOnSaleItem({ }, }) ); + + if (contextName && messageId) { + const params = { + contextName: contextName, + messageId: messageId, + shelfLocation: shelfLocation, + shelfId: shelfId, + shelfTitle: shelfTitle, + productId: productId, + productTitle: productName, + partner: patnerName, + brand: brandName, + price: originalPrice, + discount: discountRate, + locaiton: order, + category: catNm, + }; + dispatch(sendLogTotalRecommend(params)); + } }, - [dispatch, itemData] + [dispatch, itemData, contextName, messageId] ); const prdtNum = label ? label : ""; const discountLabel = discountRate ? discountRate + " discount," : ""; diff --git a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx index a38cabe4..ecbc4587 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx @@ -252,7 +252,7 @@ export default memo(function SubCategory({ contextName={LOG_CONTEXT_NAME.HOME} messageId={LOG_MESSAGE_ID.SHELF_CLICK} catNm={categoryItemInfos.catNm} - location={itemIndex + 1} + order={itemIndex + 1} shelfId={spotlightId} shelfLocation={shelfLocation} shelfTitle={shelfTitle}