통합로그 API 2차
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { URLS } from '../api/apiConfig';
|
||||
import {
|
||||
countryCode,
|
||||
URLS,
|
||||
} from '../api/apiConfig';
|
||||
import { TLogEvent } from '../api/TLogEvent';
|
||||
import {
|
||||
LOG_MENU,
|
||||
@@ -155,24 +158,31 @@ 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) => {
|
||||
export const postTotalLog = (params, url) => (dispatch, getState) => {
|
||||
const onSuccess = (response) => {
|
||||
console.log("Total Log onSuccess.....", response);
|
||||
console.log("#Total Log onSuccess.....", response);
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("totalLog onFail...", error);
|
||||
console.error("#totalLog onFail...", error);
|
||||
};
|
||||
|
||||
TLogEvent(dispatch, getState, "post", {}, params, onSuccess, onFail);
|
||||
TLogEvent(
|
||||
dispatch,
|
||||
getState,
|
||||
"post",
|
||||
URLS.LOG_TOTAL_RECOMMEND,
|
||||
{},
|
||||
params,
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
};
|
||||
|
||||
export const postLog = (params, url) => (dispatch, getState) => {
|
||||
@@ -1590,15 +1600,30 @@ export const sendLogCheckOutBtnClick = (params) => (dispatch, getState) => {
|
||||
export const sendLogTotalRecommend = (params) => (dispatch, getState) => {
|
||||
const { entryMenu } = getState().common.menu;
|
||||
const { macAddress } = getState().common.macAddress;
|
||||
const userNumber = getState().common.appStatus.loginUserData.userNumber;
|
||||
|
||||
const macAddr = macAddress?.wired ? macAddress?.wired : macAddress?.wifi;
|
||||
const localMacAddress = "00:1A:2B:3C:4D:5E";
|
||||
|
||||
const introTermsAgree = getState().common.introTermsAgree;
|
||||
const deviceEulaFlag = introTermsAgree ? "Y" : "N";
|
||||
|
||||
const newParams = {
|
||||
...params,
|
||||
macAddr: macAddress.wired ? macAddress.wired : macAddress.wifi,
|
||||
userNumber: userNumber,
|
||||
macAddr: macAddr ? macAddr : localMacAddress,
|
||||
deviceEulaFlag: deviceEulaFlag,
|
||||
entryMenu: entryMenu,
|
||||
messageId: "AL",
|
||||
contextName: "1",
|
||||
apppVersion: "1",
|
||||
logCreateTime: "1",
|
||||
salesModelCode: "1",
|
||||
deviceId: "1",
|
||||
devicePlatformVersion: "1",
|
||||
countryCode: "1",
|
||||
platformVersion: "1",
|
||||
platformCode: "1",
|
||||
};
|
||||
|
||||
dispatch(postTotalLog(newParams));
|
||||
|
||||
@@ -21,12 +21,6 @@ export const TLogEvent = (
|
||||
const { deviceId: dvcId } = appStatus;
|
||||
const dvcTp = "tv";
|
||||
|
||||
console.log("#cntry_c", cntryCd);
|
||||
console.log("#play_cd", platCd);
|
||||
console.log("#prodCd", prodCd);
|
||||
|
||||
console.log("#AUTH", AUTHORIZATION);
|
||||
|
||||
if (typeof window === "object") {
|
||||
let url = Array.isArray(baseUrl)
|
||||
? getUrl(getState, baseUrl[0])
|
||||
|
||||
@@ -247,9 +247,6 @@ export const LOG_TP_NO = {
|
||||
|
||||
// IF-LGSP-LOG-112 / Check out 화면 버튼 클릭 이력
|
||||
CHECKOUT_BTN_CLICK: "902",
|
||||
|
||||
// IF-LGSP-LOG-200 / 통합 추천 로그
|
||||
TOTAL_RECOMMEND: "606",
|
||||
};
|
||||
|
||||
// TV log update
|
||||
|
||||
Reference in New Issue
Block a user