통합로그 API
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import { URLS } from "../api/apiConfig";
|
||||
import { TLogEvent } from "../api/TLogEvent";
|
||||
import { LOG_MENU, LOG_TP_NO } from "../utils/Config";
|
||||
import { URLS } from '../api/apiConfig';
|
||||
import { TLogEvent } from '../api/TLogEvent';
|
||||
import {
|
||||
LOG_MENU,
|
||||
LOG_TP_NO,
|
||||
} from '../utils/Config';
|
||||
import {
|
||||
formatGMTString,
|
||||
getTimeDifferenceByMilliseconds,
|
||||
} from "../utils/helperMethods";
|
||||
import { setGNBMenu, setSecondLayerInfo } from "./commonActions";
|
||||
} from '../utils/helperMethods';
|
||||
import {
|
||||
setGNBMenu,
|
||||
setSecondLayerInfo,
|
||||
} from './commonActions';
|
||||
|
||||
export const getUrlByLogTpNo = (logTpNo) => {
|
||||
switch (logTpNo) {
|
||||
@@ -149,12 +155,26 @@ export const getUrlByLogTpNo = (logTpNo) => {
|
||||
// IF-LGSP-LOG-112 / Check out 화면 버튼 클릭 이력
|
||||
case LOG_TP_NO.CHECKOUT_BTN_CLICK:
|
||||
return URLS.LOG_CHECKOUT_BTN_CLICK;
|
||||
case LOG_TP_NO.TOTAL_RECOMMEND:
|
||||
return URLS.LOG_TOTAL_RECOMMEND;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
export const postTotalLog = (params) => (dispatch, getState) => {
|
||||
const onSuccess = (response) => {
|
||||
console.log("Total Log onSuccess.....", response);
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("totalLog onFail...", error);
|
||||
};
|
||||
|
||||
TLogEvent(dispatch, getState, "post", {}, params, onSuccess, onFail);
|
||||
};
|
||||
|
||||
export const postLog = (params, url) => (dispatch, getState) => {
|
||||
const { logTpNo } = params;
|
||||
|
||||
@@ -1564,3 +1584,22 @@ export const sendLogCheckOutBtnClick = (params) => (dispatch, getState) => {
|
||||
|
||||
dispatch(postLog(newParams));
|
||||
};
|
||||
|
||||
// IF-LGSP-LOG-200 / 통합 추천 로그
|
||||
|
||||
export const sendLogTotalRecommend = (params) => (dispatch, getState) => {
|
||||
const { entryMenu } = getState().common.menu;
|
||||
const { macAddress } = getState().common.macAddress;
|
||||
|
||||
const introTermsAgree = getState().common.introTermsAgree;
|
||||
const deviceEulaFlag = introTermsAgree ? "Y" : "N";
|
||||
|
||||
const newParams = {
|
||||
...params,
|
||||
macAddr: macAddress.wired ? macAddress.wired : macAddress.wifi,
|
||||
deviceEulaFlag: deviceEulaFlag,
|
||||
entryMenu: entryMenu,
|
||||
};
|
||||
|
||||
dispatch(postTotalLog(newParams));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user