diff --git a/com.twin.app.shoptime/src/actions/myPageActions.js b/com.twin.app.shoptime/src/actions/myPageActions.js index b8fa6df7..38bc1b5e 100644 --- a/com.twin.app.shoptime/src/actions/myPageActions.js +++ b/com.twin.app.shoptime/src/actions/myPageActions.js @@ -182,8 +182,22 @@ export const deleteMyFavorite = (params) => (dispatch, getState) => { // MyPage 약관 철회 (IF-LGSP-032) export const setMyTermsWithdraw = (params, callback) => (dispatch, getState) => { + let localMacAddress; const { mandatoryIncludeYn, termsList } = params; + // 약관철회 파라미터 추가 로그 요청 + const httpHeader = getState().common.httpHeader; + const macAddress = getState().common.macAddress; + const userNumber = getState().common.appStatus.loginUserData.userNumber; + + const macAddr = macAddress?.wired ? macAddress?.wired : macAddress?.wifi; + + if (typeof window === "object" && !window.PalmSystem) { + localMacAddress = "00:1A:2B:3C:4D:5E"; + } + const logCreateTime = new Date().toISOString(); + const xDeviceProduct = httpHeader["X-Device-Product"] || httpHeader.prod_cd; + const onSuccess = (response) => { console.log("setMyTermsWithdraw onSuccess ", response.data); @@ -205,7 +219,14 @@ export const setMyTermsWithdraw = "post", URLS.SET_MY_TERMS_WITHDRAW, {}, - { mandatoryIncludeYn, termsList }, + { + mandatoryIncludeYn, + termsList, + xDeviceProduct, + macAddr: macAddr ? macAddr : localMacAddress, + userNumber, + requestTime: logCreateTime, + }, onSuccess, onFail ); @@ -223,14 +244,17 @@ export const setMyPageTermsAgree = // 약관 ID를 약관 코드로 변환하기 위해 state에서 termsIdMap 조회 const termsIdMap = getState().home.termsIdMap || {}; - const idToCodeMap = Object.entries(termsIdMap).reduce((acc, [code, id]) => { - acc[id] = code; - return acc; - }, {}); + const idToCodeMap = Object.entries(termsIdMap).reduce( + (acc, [code, id]) => { + acc[id] = code; + return acc; + }, + {} + ); // 동의한 약관 ID 목록을 약관 코드로 변환 const agreedTermCodes = termsList - .map(id => idToCodeMap[id]) + .map((id) => idToCodeMap[id]) .filter(Boolean); dispatch({