From 2f5a99444d28824ace87a50b305c01e9c33247cc Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Tue, 18 Nov 2025 18:22:47 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=BF=A0=ED=8F=B0]=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EB=B0=8F=20retcode=200=20=EC=95=84?= =?UTF-8?q?=EB=8B=90=EB=96=84=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 다운로드 쿠폰이 아니면 다운로드 버튼 노출 및 다운 안되도록 변경 - 전체 다운로드시 retcode0 아닐때 노출 처리. --- .../src/actions/couponActions.js | 20 ++++++--- .../ProductAllSection/ProductAllSection.jsx | 45 ++++++++++--------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/com.twin.app.shoptime/src/actions/couponActions.js b/com.twin.app.shoptime/src/actions/couponActions.js index 66159bbe..03b0410c 100644 --- a/com.twin.app.shoptime/src/actions/couponActions.js +++ b/com.twin.app.shoptime/src/actions/couponActions.js @@ -38,11 +38,21 @@ export const getProductCouponTotDownload = (props) => (dispatch, getState) => { const onSuccess = (response) => { console.log("getProductCouponTotDownload onSuccess ", response.data); - - dispatch({ - type: types.GET_PRODUCT_COUPON_TOTDOWNLOAD, - payload: response.data.data, - }); + if(response.data.retCode === 0){ + dispatch({ + type: types.GET_PRODUCT_COUPON_TOTDOWNLOAD, + payload: response.data.data, + }); + } else { + dispatch( + showError( + response.data.retCode, + response.data.retMsg, + false, + response.data.retDetailCode + ) + ); + } }; const onFail = (error) => { diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index b0e8ae92..68dbf77f 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -366,7 +366,7 @@ export default function ProductAllSection({ dispatch( getProductCouponDownload({ mbrNo: userNumber, cpnSno: cpnSno }) ); - }; + }; return ( onFocus(index)} onBlur={onBlur} - onClick={handleDownloadClick} + onClick={downloadYn === "N" ? null : handleDownloadClick} >
-
0 && - downloadCouponArr.includes(cpnSno) && - css.disable, - downloadYn === "N" && css.disable, - duplDwldYn === "N" && downloadYn === "Y" && css.disable, - !downloadCouponArr.includes(cpnSno) && - index === selectedCouponIndex && - focused && - css.focused - )} - aria-label="Download Button" - > - {downloadCouponArr.length > 0 && - downloadCouponArr.includes(cpnSno) - ? $L("DOWNLOAD COMPLETED") - : $L("DOWNLOAD")} -
+ {downloadYn !== "N" && ( +
0 && + downloadCouponArr.includes(cpnSno) && + css.disable, + duplDwldYn === "N" && downloadYn === "Y" && css.disable, + !downloadCouponArr.includes(cpnSno) && + index === selectedCouponIndex && + focused && + css.focused + )} + aria-label="Download Button" + > + {downloadCouponArr.length > 0 && + downloadCouponArr.includes(cpnSno) + ? $L("DOWNLOAD COMPLETED") + : $L("DOWNLOAD")} +
+ )}
);