약관철회시 로그 수정
This commit is contained in:
@@ -182,8 +182,22 @@ export const deleteMyFavorite = (params) => (dispatch, getState) => {
|
|||||||
// MyPage 약관 철회 (IF-LGSP-032)
|
// MyPage 약관 철회 (IF-LGSP-032)
|
||||||
export const setMyTermsWithdraw =
|
export const setMyTermsWithdraw =
|
||||||
(params, callback) => (dispatch, getState) => {
|
(params, callback) => (dispatch, getState) => {
|
||||||
|
let localMacAddress;
|
||||||
const { mandatoryIncludeYn, termsList } = params;
|
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) => {
|
const onSuccess = (response) => {
|
||||||
console.log("setMyTermsWithdraw onSuccess ", response.data);
|
console.log("setMyTermsWithdraw onSuccess ", response.data);
|
||||||
|
|
||||||
@@ -205,7 +219,14 @@ export const setMyTermsWithdraw =
|
|||||||
"post",
|
"post",
|
||||||
URLS.SET_MY_TERMS_WITHDRAW,
|
URLS.SET_MY_TERMS_WITHDRAW,
|
||||||
{},
|
{},
|
||||||
{ mandatoryIncludeYn, termsList },
|
{
|
||||||
|
mandatoryIncludeYn,
|
||||||
|
termsList,
|
||||||
|
xDeviceProduct,
|
||||||
|
macAddr: macAddr ? macAddr : localMacAddress,
|
||||||
|
userNumber,
|
||||||
|
requestTime: logCreateTime,
|
||||||
|
},
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onFail
|
onFail
|
||||||
);
|
);
|
||||||
@@ -223,14 +244,17 @@ export const setMyPageTermsAgree =
|
|||||||
|
|
||||||
// 약관 ID를 약관 코드로 변환하기 위해 state에서 termsIdMap 조회
|
// 약관 ID를 약관 코드로 변환하기 위해 state에서 termsIdMap 조회
|
||||||
const termsIdMap = getState().home.termsIdMap || {};
|
const termsIdMap = getState().home.termsIdMap || {};
|
||||||
const idToCodeMap = Object.entries(termsIdMap).reduce((acc, [code, id]) => {
|
const idToCodeMap = Object.entries(termsIdMap).reduce(
|
||||||
acc[id] = code;
|
(acc, [code, id]) => {
|
||||||
return acc;
|
acc[id] = code;
|
||||||
}, {});
|
return acc;
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
// 동의한 약관 ID 목록을 약관 코드로 변환
|
// 동의한 약관 ID 목록을 약관 코드로 변환
|
||||||
const agreedTermCodes = termsList
|
const agreedTermCodes = termsList
|
||||||
.map(id => idToCodeMap[id])
|
.map((id) => idToCodeMap[id])
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|||||||
Reference in New Issue
Block a user