Revert "deeplink debug 코드 추가"

This reverts commit 9bc8d6f68f.
This commit is contained in:
opacity@t-win.kr
2025-08-22 11:07:52 +09:00
parent 9bc8d6f68f
commit 0303e9d2ae
8 changed files with 164 additions and 633 deletions

View File

@@ -71,6 +71,8 @@ import { sendLogTotalRecommend } from "../actions/logActions";
// } from "../utils/focus-monitor"; // } from "../utils/focus-monitor";
// import { PanelHoc } from "../components/TPanel/TPanel"; // import { PanelHoc } from "../components/TPanel/TPanel";
let foreGroundChangeTimer = null; let foreGroundChangeTimer = null;
// 기존 콘솔 메서드를 백업 // 기존 콘솔 메서드를 백업
@@ -147,15 +149,15 @@ function AppBase(props) {
(state) => state.common.appStatus.cursorVisible (state) => state.common.appStatus.cursorVisible
); );
const introTermsAgree = useSelector((state) => state.common.introTermsAgree); const introTermsAgree = useSelector((state) => state.common.introTermsAgree);
const deviceRegistered = useSelector( const deviceRegistered = useSelector((state) => state.common.deviceRegistered);
(state) => state.common.deviceRegistered
);
// const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree); // const optionalTermsAgree = useSelector((state) => state.common.optionalTermsAgree);
const termsLoading = useSelector((state) => state.common.termsLoading); const termsLoading = useSelector((state) => state.common.termsLoading);
// termsFlag 전체 상태 확인 // termsFlag 전체 상태 확인
// const termsFlag = useSelector((state) => state.common.termsFlag); // const termsFlag = useSelector((state) => state.common.termsFlag);
const termsData = useSelector((state) => state.home.termsData); const termsData = useSelector((state) => state.home.termsData);
useEffect(() => { useEffect(() => {
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
if (termsData && termsData.data && termsData.data.terms) { if (termsData && termsData.data && termsData.data.terms) {
@@ -171,8 +173,7 @@ function AppBase(props) {
// const macAddress = useSelector((state) => state.common.macAddress); // const macAddress = useSelector((state) => state.common.macAddress);
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
const deviceCountryCode = const deviceCountryCode = httpHeader && httpHeader["X-Device-Country"] || "";
(httpHeader && httpHeader["X-Device-Country"]) || "";
useEffect(() => { useEffect(() => {
if (!cursorVisible && !Spotlight.getCurrent()) { if (!cursorVisible && !Spotlight.getCurrent()) {
@@ -219,67 +220,32 @@ function AppBase(props) {
// }, [dispatch]); // }, [dispatch]);
// called by [receive httpHeader, launch, relaunch] // called by [receive httpHeader, launch, relaunch]
const initService = useCallback( const initService = useCallback(
(haveyInit = true) => { (haveyInit = true) => {
// console.log( // console.log(
// "<<<<<<<<<<<<< appinfo >>>>>>>>>>>>{heavyInit, appinfo} ", // "<<<<<<<<<<<<< appinfo >>>>>>>>>>>>{heavyInit, appinfo} ",
// haveyInit, // haveyInit,
// appinfo // appinfo
// ); // );
console.log("[DEBUG] httpHeaderRef.current:", httpHeaderRef.current);
console.log("[DEBUG] httpHeader state:", httpHeader);
console.log( console.log(
"[App.js] initService,httpHeaderRef.current", "[App.js] initService,httpHeaderRef.current",
httpHeaderRef.current httpHeaderRef.current
); );
console.log("[App.js] haveyInit", haveyInit); console.log("[App.js] haveyInit", haveyInit);
// 🔍 DEEPLINK DEBUG: HTTP Header 상태 상세 확인
console.log("🔍 [DEEPLINK DEBUG] ===== HTTP Header 상태 =====");
console.log(
"🔍 [DEEPLINK DEBUG] httpHeaderRef.current:",
httpHeaderRef.current
);
console.log("🔍 [DEEPLINK DEBUG] httpHeader state:", httpHeader);
console.log("🔍 [DEEPLINK DEBUG] deviceCountryCode:", deviceCountryCode);
console.log(
"🔍 [DEEPLINK DEBUG] httpHeader null 여부:",
httpHeaderRef.current === null
);
if (httpHeaderRef.current) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ httpHeaderRef.current 존재 - 딥링크 실행 가능"
);
console.log(
"🔍 [DEEPLINK DEBUG] Country Code:",
httpHeaderRef.current["X-Device-Country"]
);
console.log(
"🔍 [DEEPLINK DEBUG] Language Code:",
httpHeaderRef.current["X-Device-Language"]
);
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ httpHeaderRef.current가 null - 딥링크 실행 불가"
);
}
if (httpHeaderRef.current) { if (httpHeaderRef.current) {
if (haveyInit) { if (haveyInit) {
dispatch(changeAppStatus({ connectionFailed: false })); dispatch(changeAppStatus({ connectionFailed: false }));
if (typeof window === "object" && window.PalmSystem) { if (typeof window === "object" && window.PalmSystem) {
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible: cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
window.PalmSystem && })
window.PalmSystem.cursor && );
window.PalmSystem.cursor.visibility,
})
);
} }
dispatch(getHomeMenu()); dispatch(getHomeMenu());
dispatch(getMyRecommandedKeyword()); dispatch(getMyRecommandedKeyword());
@@ -294,38 +260,14 @@ function AppBase(props) {
JSON.stringify(launchParams) JSON.stringify(launchParams)
); );
// 🔍 DEEPLINK DEBUG: Launch Parameters 상세 확인
console.log("🔍 [DEEPLINK DEBUG] ===== Launch Parameters 상태 =====");
console.log("🔍 [DEEPLINK DEBUG] launchParams:", launchParams);
console.log(
"🔍 [DEEPLINK DEBUG] contentTarget:",
launchParams?.contentTarget
);
console.log("🔍 [DEEPLINK DEBUG] bypass:", launchParams?.bypass);
console.log(
"🔍 [DEEPLINK DEBUG] contentTarget 존재 여부:",
!!launchParams?.contentTarget
);
// pyh TODO: edit or delete later (line 196 ~ 198) // pyh TODO: edit or delete later (line 196 ~ 198)
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
if (launchParams && launchParams.bypass) { if (launchParams && launchParams.bypass) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ Bypass 링크 실행:",
launchParams.bypass
);
dispatch(handleBypassLink(launchParams.bypass)); dispatch(handleBypassLink(launchParams.bypass));
} }
if (launchParams && launchParams.contentTarget) { if (launchParams && launchParams.contentTarget) {
console.log(
"🔍 [DEEPLINK DEBUG] ✅ 딥링크 실행:",
launchParams.contentTarget
);
dispatch(handleDeepLink(launchParams.contentTarget)); dispatch(handleDeepLink(launchParams.contentTarget));
} else { } else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ contentTarget 없음 - 딥링크 실행하지 않음"
);
dispatch( dispatch(
sendLogTotalRecommend({ sendLogTotalRecommend({
contextName: Config.LOG_CONTEXT_NAME.ENTRY, contextName: Config.LOG_CONTEXT_NAME.ENTRY,
@@ -369,15 +311,11 @@ function AppBase(props) {
// set foreground flag using delay time. // set foreground flag using delay time.
clearTimeout(foreGroundChangeTimer); clearTimeout(foreGroundChangeTimer);
foreGroundChangeTimer = setTimeout(() => { foreGroundChangeTimer = setTimeout(() => {
console.log( console.log(
"visibility changed !!! ==> set to foreground cursorVisible", "visibility changed !!! ==> set to foreground cursorVisible",
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
JSON.stringify( JSON.stringify(window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility)
window.PalmSystem && ); // eslint-disable-line no-console
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility
)
); // eslint-disable-line no-console
if (platform.platformName !== "webos") { if (platform.platformName !== "webos") {
//for debug //for debug
dispatch( dispatch(
@@ -391,10 +329,7 @@ function AppBase(props) {
changeAppStatus({ changeAppStatus({
isAppForeground: true, isAppForeground: true,
// Chromium68 호환성을 위해 Optional Chaining 제거 // Chromium68 호환성을 위해 Optional Chaining 제거
cursorVisible: cursorVisible: window.PalmSystem && window.PalmSystem.cursor && window.PalmSystem.cursor.visibility,
window.PalmSystem &&
window.PalmSystem.cursor &&
window.PalmSystem.cursor.visibility,
}) })
); );
} }
@@ -523,7 +458,6 @@ function AppBase(props) {
? launchParmas.contentTarget.split("_")[1] || "" ? launchParmas.contentTarget.split("_")[1] || ""
: "1000"; : "1000";
console.log("###launchParmas.contentTarget", launchParmas.contentTarget);
if (launchParmas.contentTarget) { if (launchParmas.contentTarget) {
dispatch( dispatch(
setDeepLink({ setDeepLink({

View File

@@ -13,16 +13,6 @@ import { sendLogTotalRecommend } from "../actions/logActions";
//V2_진입경로코드_진입경로명_MT_노출순번 //V2_진입경로코드_진입경로명_MT_노출순번
export const handleDeepLink = (contentTarget) => (dispatch, getState) => { export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
console.log("[handleDeepLink] ~ contentTarget: ", contentTarget); console.log("[handleDeepLink] ~ contentTarget: ", contentTarget);
// 🔍 DEEPLINK DEBUG: 딥링크 핸들러 시작
console.log("🔍 [DEEPLINK DEBUG] ===== handleDeepLink 실행 =====");
console.log("🔍 [DEEPLINK DEBUG] contentTarget:", contentTarget);
console.log("🔍 [DEEPLINK DEBUG] contentTarget 타입:", typeof contentTarget);
console.log(
"🔍 [DEEPLINK DEBUG] contentTarget null/undefined 여부:",
contentTarget === null || contentTarget === undefined
);
let linkTpCd; // 진입경로코드 let linkTpCd; // 진입경로코드
let linkTpNm; // 진입경로명 let linkTpNm; // 진입경로명
let type; // 링크 타입 let type; // 링크 타입
@@ -39,22 +29,11 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
let tabType; // 카테고리 탭명 let tabType; // 카테고리 탭명
if (contentTarget === null || contentTarget === undefined) { if (contentTarget === null || contentTarget === undefined) {
console.log(
"🔍 [DEEPLINK DEBUG] ⚠️ contentTarget이 null/undefined - 기본값 설정"
);
linkTpCd = "1000"; linkTpCd = "1000";
linkTpNm = LOG_MENU.APP; linkTpNm = LOG_MENU.APP;
} else { } else {
console.log("🔍 [DEEPLINK DEBUG] ✅ contentTarget 존재 - 파싱 시작");
const tokens = contentTarget.split("_"); const tokens = contentTarget.split("_");
console.log("🔍 [DEEPLINK DEBUG] 토큰 분리 결과:", tokens);
console.log("🔍 [DEEPLINK DEBUG] 버전:", tokens[0]);
console.log("🔍 [DEEPLINK DEBUG] 진입경로코드:", tokens[1]);
console.log("🔍 [DEEPLINK DEBUG] 진입경로명:", tokens[2]);
console.log("🔍 [DEEPLINK DEBUG] 타입:", tokens[3]);
if (tokens[0] === "V2" || tokens[0] === "V3") { if (tokens[0] === "V2" || tokens[0] === "V3") {
console.log("🔍 [DEEPLINK DEBUG] ✅ 유효한 딥링크 버전:", tokens[0]);
linkTpCd = tokens[1]; linkTpCd = tokens[1];
linkTpNm = tokens[2]; linkTpNm = tokens[2];
type = tokens[3]; type = tokens[3];
@@ -64,34 +43,19 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
let panelInfo = {}; let panelInfo = {};
if (tokens[0] === "V2") { if (tokens[0] === "V2") {
console.log(
"🔍 [DEEPLINK DEBUG] ⚠️ V2 버전 - HOME_PANEL로 이동 후 종료"
);
panelName = panel_names.HOME_PANEL; panelName = panel_names.HOME_PANEL;
return; return;
} }
console.log("🔍 [DEEPLINK DEBUG] V3 버전 - 타입별 처리 시작");
if (parseInt(linkTpCd) < 2000 || parseInt(linkTpCd) > 8999) { if (parseInt(linkTpCd) < 2000 || parseInt(linkTpCd) > 8999) {
console.log(
"🔍 [DEEPLINK DEBUG] ⚠️ 유효하지 않은 진입경로코드:",
linkTpCd,
"-> 9999로 변경"
);
linkTpCd = "9999"; linkTpCd = "9999";
linkTpNm = LOG_MENU.UNKNOWN; linkTpNm = LOG_MENU.UNKNOWN;
} }
console.log("🔍 [DEEPLINK DEBUG] 최종 linkTpCd:", linkTpCd);
console.log("🔍 [DEEPLINK DEBUG] 최종 linkTpNm:", linkTpNm);
console.log("🔍 [DEEPLINK DEBUG] 처리할 타입:", type);
switch (type) { switch (type) {
case "MT": case "MT":
// "MT": Main TOP // "MT": Main TOP
// V3_진입경로코드_진입경로명_MT_노출순번 // V3_진입경로코드_진입경로명_MT_노출순번
console.log("🔍 [DEEPLINK DEBUG] ✅ MT 타입: Main TOP 처리");
panelName = panel_names.HOME_PANEL; panelName = panel_names.HOME_PANEL;
deeplinkPanel = "Main TOP"; deeplinkPanel = "Main TOP";
break; break;
@@ -305,45 +269,17 @@ export const handleDeepLink = (contentTarget) => (dispatch, getState) => {
}) })
); );
// 🔍 DEEPLINK DEBUG: 패널 이동 처리
console.log("🔍 [DEEPLINK DEBUG] ===== 패널 이동 처리 =====");
console.log("🔍 [DEEPLINK DEBUG] panelName:", panelName);
console.log("🔍 [DEEPLINK DEBUG] deeplinkPanel:", deeplinkPanel);
console.log("🔍 [DEEPLINK DEBUG] panelInfo:", panelInfo);
if (panelName) { if (panelName) {
console.log("🔍 [DEEPLINK DEBUG] ✅ 패널 이동 실행");
const action = const action =
panelName === panel_names.HOME_PANEL ? updateHomeInfo : pushPanel; panelName === panel_names.HOME_PANEL ? updateHomeInfo : pushPanel;
console.log(
"🔍 [DEEPLINK DEBUG] 사용할 액션:",
panelName === panel_names.HOME_PANEL ? "updateHomeInfo" : "pushPanel"
);
console.log("🔍 [DEEPLINK DEBUG] 최종 액션 파라미터:", {
name: panelName,
panelInfo: { ...panelInfo, linkTpCd },
});
dispatch( dispatch(
action({ action({
name: panelName, name: panelName,
panelInfo: { ...panelInfo, linkTpCd }, panelInfo: { ...panelInfo, linkTpCd },
}) })
); );
console.log("🔍 [DEEPLINK DEBUG] ✅ 패널 이동 디스패치 완료");
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ panelName이 없음 - 패널 이동하지 않음"
);
} }
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ 유효하지 않은 딥링크 버전:",
tokens[0]
);
} }
} }
console.log("🔍 [DEEPLINK DEBUG] ===== handleDeepLink 종료 =====");
}; };

View File

@@ -32,7 +32,7 @@ export const gnbOpened = (status) => ({
}); });
export const setShowPopup = (config) => { export const setShowPopup = (config) => {
const payload = typeof config === "string" ? { activePopup: config } : config; const payload = typeof config === 'string' ? { activePopup: config } : config;
return { return {
type: types.SET_SHOW_POPUP, type: types.SET_SHOW_POPUP,
payload, payload,
@@ -193,80 +193,44 @@ export const getHttpHeaderForServiceRequest =
convertedRes["os_ver"] = version; convertedRes["os_ver"] = version;
convertedRes["dvc_auth"] = res["X-Authentication"]; convertedRes["dvc_auth"] = res["X-Authentication"];
// 🔍 DEEPLINK DEBUG: 국가 코드 설정 상세 확인
console.log("🔍 [DEEPLINK DEBUG] ===== 국가 코드 설정 =====");
console.log("🔍 [DEEPLINK DEBUG] serverType:", serverType);
console.log("🔍 [DEEPLINK DEBUG] ricCodeSetting:", ricCodeSetting);
console.log("🔍 [DEEPLINK DEBUG] languageSetting:", languageSetting);
console.log(
"🔍 [DEEPLINK DEBUG] 원본 X-Device-Country:",
res["X-Device-Country"]
);
if (serverType !== "system") { if (serverType !== "system") {
if (ricCodeSetting === "eic") { if (ricCodeSetting === "eic") {
console.log("🔍 [DEEPLINK DEBUG] EIC 지역 설정 중...");
if (languageSetting === "GB") { if (languageSetting === "GB") {
console.log("🔍 [DEEPLINK DEBUG] ✅ GB 설정 적용");
convertedRes["cntry_cd"] = "GB"; convertedRes["cntry_cd"] = "GB";
convertedRes["X-Device-Country"] = "GB"; convertedRes["X-Device-Country"] = "GB";
res["HOST"] = "GB.nextlgsdp.com"; res["HOST"] = "GB.nextlgsdp.com";
} }
if (languageSetting === "DE") { if (languageSetting === "DE") {
console.log("🔍 [DEEPLINK DEBUG] ✅ DE 설정 적용");
convertedRes["cntry_cd"] = "DE"; convertedRes["cntry_cd"] = "DE";
convertedRes["X-Device-Country"] = "DE"; convertedRes["X-Device-Country"] = "DE";
res["HOST"] = "DE.nextlgsdp.com"; res["HOST"] = "DE.nextlgsdp.com";
} }
} }
if (ricCodeSetting === "aic") { if (ricCodeSetting === "aic") {
console.log("🔍 [DEEPLINK DEBUG] ✅ AIC 지역 설정 중... US 적용");
convertedRes["cntry_cd"] = "US"; convertedRes["cntry_cd"] = "US";
convertedRes["X-Device-Country"] = "US"; convertedRes["X-Device-Country"] = "US";
res["HOST"] = "US.nextlgsdp.com"; res["HOST"] = "US.nextlgsdp.com";
} }
if (ricCodeSetting === "ruc") { if (ricCodeSetting === "ruc") {
console.log("🔍 [DEEPLINK DEBUG] ✅ RUC 지역 설정 중... RU 적용");
convertedRes["cntry_cd"] = "RU"; convertedRes["cntry_cd"] = "RU";
convertedRes["X-Device-Country"] = "RU"; convertedRes["X-Device-Country"] = "RU";
res["HOST"] = "RU.nextlgsdp.com"; res["HOST"] = "RU.nextlgsdp.com";
} }
} else {
console.log(
"🔍 [DEEPLINK DEBUG] ⚠️ serverType이 system - 국가 설정 변경 안함"
);
} }
// 🔍 DEEPLINK DEBUG: 언어 코드 설정 확인
console.log("🔍 [DEEPLINK DEBUG] ===== 언어 코드 설정 =====");
console.log(
"🔍 [DEEPLINK DEBUG] 최종 cntry_cd:",
convertedRes["cntry_cd"]
);
if (convertedRes["cntry_cd"] === "US") { if (convertedRes["cntry_cd"] === "US") {
convertedRes["lang_cd"] = "en-US"; convertedRes["lang_cd"] = "en-US";
console.log("🔍 [DEEPLINK DEBUG] ✅ US 언어 설정: en-US");
} }
if (convertedRes["cntry_cd"] === "DE") { if (convertedRes["cntry_cd"] === "DE") {
convertedRes["lang_cd"] = "de-DE"; convertedRes["lang_cd"] = "de-DE";
console.log("🔍 [DEEPLINK DEBUG] ✅ DE 언어 설정: de-DE");
} }
if (convertedRes["cntry_cd"] === "GB") { if (convertedRes["cntry_cd"] === "GB") {
convertedRes["lang_cd"] = "en-GB"; convertedRes["lang_cd"] = "en-GB";
console.log("🔍 [DEEPLINK DEBUG] ✅ GB 언어 설정: en-GB");
} }
if (convertedRes["cntry_cd"] === "RU") { if (convertedRes["cntry_cd"] === "RU") {
convertedRes["lang_cd"] = "ru-RU"; convertedRes["lang_cd"] = "ru-RU";
console.log("🔍 [DEEPLINK DEBUG] ✅ RU 언어 설정: ru-RU");
} }
console.log(
"🔍 [DEEPLINK DEBUG] 최종 lang_cd:",
convertedRes["lang_cd"]
);
console.log("🔍 [DEEPLINK DEBUG] 최종 HOST:", res["HOST"]);
dispatch({ type: types.GET_HTTP_HEADER, payload: convertedRes }); dispatch({ type: types.GET_HTTP_HEADER, payload: convertedRes });
dispatch( dispatch(
changeAppStatus({ changeAppStatus({
@@ -329,24 +293,21 @@ export const getTermsAgreeYn = () => (dispatch, getState) => {
try { try {
const { terms } = getState().home.termsData.data; const { terms } = getState().home.termsData.data;
console.log( console.log("getTermsAgreeYn", terms.map(term => ({
"getTermsAgreeYn", trmsId: term.trmsId,
terms.map((term) => ({ trmsTpCd: term.trmsTpCd,
trmsId: term.trmsId, trmsAgrFlag: term.trmsAgrFlag,
trmsTpCd: term.trmsTpCd, trmsPopFlag: term.trmsPopFlag,
trmsAgrFlag: term.trmsAgrFlag, })));
trmsPopFlag: term.trmsPopFlag,
}))
);
// MST00405 선택약관 정보만 따로 출력 // MST00405 선택약관 정보만 따로 출력
const optionalTerm = terms.find((term) => term.trmsTpCd === "MST00405"); const optionalTerm = terms.find(term => term.trmsTpCd === 'MST00405');
if (optionalTerm) { if (optionalTerm) {
console.log("getTermsAgreeYn MST00405 선택약관:", { console.log("getTermsAgreeYn MST00405 선택약관:", {
trmsId: optionalTerm.trmsId, trmsId: optionalTerm.trmsId,
trmsTpCd: optionalTerm.trmsTpCd, trmsTpCd: optionalTerm.trmsTpCd,
trmsAgrFlag: optionalTerm.trmsAgrFlag, trmsAgrFlag: optionalTerm.trmsAgrFlag,
trmsPopFlag: optionalTerm.trmsPopFlag, trmsPopFlag: optionalTerm.trmsPopFlag
}); });
} else { } else {
console.log("getTermsAgreeYn MST00405 선택약관을 찾을 수 없습니다."); console.log("getTermsAgreeYn MST00405 선택약관을 찾을 수 없습니다.");
@@ -797,37 +758,35 @@ export const resetOptionalTermsSession = () => ({
// 선택약관 동의 처리를 위한 헬퍼 함수 // 선택약관 동의 처리를 위한 헬퍼 함수
export const handleOptionalTermsAgree = () => (dispatch) => { export const handleOptionalTermsAgree = () => (dispatch) => {
console.log("[CommonActions] 선택약관 동의 처리"); console.log('[CommonActions] 선택약관 동의 처리');
dispatch(setOptionalTermsUserDecision("agreed")); dispatch(setOptionalTermsUserDecision('agreed'));
dispatch(setOptionalTermsPopupShown(true)); dispatch(setOptionalTermsPopupShown(true));
}; };
// 선택약관 거절 처리를 위한 헬퍼 함수 // 선택약관 거절 처리를 위한 헬퍼 함수
export const handleOptionalTermsDecline = () => (dispatch) => { export const handleOptionalTermsDecline = () => (dispatch) => {
console.log("[CommonActions] 선택약관 거절 처리"); console.log('[CommonActions] 선택약관 거절 처리');
dispatch(setOptionalTermsUserDecision("declined")); dispatch(setOptionalTermsUserDecision('declined'));
dispatch(setOptionalTermsPopupShown(true)); dispatch(setOptionalTermsPopupShown(true));
}; };
// 선택약관 상태 통합 업데이트 (TV 환경 최적화 - API 호출 없이 즉시 반영) // 선택약관 상태 통합 업데이트 (TV 환경 최적화 - API 호출 없이 즉시 반영)
export const updateOptionalTermsAgreement = export const updateOptionalTermsAgreement = (agreed = true) => (dispatch) => {
(agreed = true) => console.log(`[CommonActions] 선택약관 통합 상태 업데이트: ${agreed}`);
(dispatch) => {
console.log(`[CommonActions] 선택약관 통합 상태 업데이트: ${agreed}`);
// 1. optionalTermsPopupFlow 업데이트 (TV 환경용) // 1. optionalTermsPopupFlow 업데이트 (TV 환경용)
dispatch(setOptionalTermsUserDecision(agreed ? "agreed" : "declined")); dispatch(setOptionalTermsUserDecision(agreed ? 'agreed' : 'declined'));
dispatch(setOptionalTermsPopupShown(true)); dispatch(setOptionalTermsPopupShown(true));
// 2. 기본 optionalTermsAgree 상태 직접 업데이트 (API 호출 없이) // 2. 기본 optionalTermsAgree 상태 직접 업데이트 (API 호출 없이)
dispatch({ dispatch({
type: types.UPDATE_OPTIONAL_TERMS_AGREE_DIRECT, type: types.UPDATE_OPTIONAL_TERMS_AGREE_DIRECT,
payload: agreed, payload: agreed
}); });
// 3. termsAgreementStatus도 동기화 // 3. termsAgreementStatus도 동기화
dispatch({ dispatch({
type: types.UPDATE_TERMS_AGREEMENT_STATUS_DIRECT, type: types.UPDATE_TERMS_AGREEMENT_STATUS_DIRECT,
payload: { MST00405: agreed }, payload: { MST00405: agreed }
}); });
}; };

View File

@@ -1,11 +1,11 @@
import axios from "axios"; import axios from 'axios';
import Spotlight from "@enact/spotlight"; import Spotlight from '@enact/spotlight';
import { useDispatch } from "react-redux"; import { useDispatch } from 'react-redux';
import { useState } from "react"; import { useState } from 'react';
import { fetchCurrentUserHomeTermsSafe } from "../actions/homeActions"; import { fetchCurrentUserHomeTermsSafe } from '../actions/homeActions';
import { types } from "../actions/actionTypes"; import { types } from '../actions/actionTypes';
import { import {
changeAppStatus, changeAppStatus,
changeLocalSettings, changeLocalSettings,
@@ -13,16 +13,22 @@ import {
setSystemNotice, setSystemNotice,
setSystemTermination, setSystemTermination,
showError, showError,
} from "../actions/commonActions"; } from '../actions/commonActions';
import { import {
getAuthenticationCode, getAuthenticationCode,
getReAuthenticationCode, getReAuthenticationCode,
} from "../actions/deviceActions"; } from '../actions/deviceActions';
import { pushPanel, resetPanels } from "../actions/panelActions"; import {
import * as Config from "../utils/Config"; pushPanel,
import { ACTIVE_POPUP } from "../utils/Config"; resetPanels,
import * as HelperMethods from "../utils/helperMethods"; } from '../actions/panelActions';
import { getUrl, URLS } from "./apiConfig"; import * as Config from '../utils/Config';
import { ACTIVE_POPUP } from '../utils/Config';
import * as HelperMethods from '../utils/helperMethods';
import {
getUrl,
URLS,
} from './apiConfig';
let tokenRefreshing = false; let tokenRefreshing = false;
const axiosQueue = []; const axiosQueue = [];
@@ -201,23 +207,8 @@ export const TAxios = (
if (onFail) onFail(res); if (onFail) onFail(res);
return; return;
} }
// 🔍 DEEPLINK DEBUG: API 에러 코드 확인
if (
res?.data?.retCode === 602 ||
res?.data?.retCode === 603 ||
res?.data?.retCode === 604
) {
console.log("🔍 [DEEPLINK DEBUG] ===== API 에러 발생 =====");
console.log("🔍 [DEEPLINK DEBUG] 에러 코드:", res?.data?.retCode);
console.log("🔍 [DEEPLINK DEBUG] API URL:", url);
console.log("🔍 [DEEPLINK DEBUG] 응답 데이터:", res?.data);
}
// 602 요청 국가 불일치 // 602 요청 국가 불일치
if (res?.data?.retCode === 602) { if (res?.data?.retCode === 602) {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ 602 에러: 요청 국가 불일치 - 국가 변경 팝업 표시"
);
dispatch( dispatch(
setShowPopup(ACTIVE_POPUP.changeCountyPopup, { setShowPopup(ACTIVE_POPUP.changeCountyPopup, {
data: res.data.retCode, data: res.data.retCode,
@@ -227,9 +218,6 @@ export const TAxios = (
} }
// 603 서비스 국가 아님 // 603 서비스 국가 아님
if (res?.data?.retCode === 603) { if (res?.data?.retCode === 603) {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ 603 에러: 서비스 지원 안하는 국가 - 지원 안함 팝업 표시"
);
dispatch( dispatch(
setShowPopup(ACTIVE_POPUP.unSupportedCountryPopup, { setShowPopup(ACTIVE_POPUP.unSupportedCountryPopup, {
data: res.data.retCode, data: res.data.retCode,
@@ -239,9 +227,6 @@ export const TAxios = (
} }
if (res?.data?.retCode === 604) { if (res?.data?.retCode === 604) {
console.log(
"🔍 [DEEPLINK DEBUG] ❌ 604 에러: 서비스 지원 안하는 언어"
);
//todo "NotServiceLanguage" //todo "NotServiceLanguage"
return; return;
} }
@@ -291,7 +276,7 @@ export const TAxiosPromise = (
success: true, success: true,
data: response.data, data: response.data,
response: response, response: response,
error: null, error: null
}); });
}, },
// onFail - 에러도 resolve로 처리하여 throw 방지 // onFail - 에러도 resolve로 처리하여 throw 방지
@@ -301,7 +286,7 @@ export const TAxiosPromise = (
success: false, success: false,
data: null, data: null,
response: null, response: null,
error: error, error: error
}); });
}, },
noTokenRefresh noTokenRefresh
@@ -333,14 +318,10 @@ export const TAxiosAdvancedPromise = (
const attemptRequest = () => { const attemptRequest = () => {
attempts++; attempts++;
console.log( console.log(`TAxiosPromise attempt ${attempts}/${maxAttempts} for ${baseUrl}`);
`TAxiosPromise attempt ${attempts}/${maxAttempts} for ${baseUrl}`
);
const timeoutId = setTimeout(() => { const timeoutId = setTimeout(() => {
const timeoutError = new Error( const timeoutError = new Error(`Request timeout after ${timeout}ms for ${baseUrl}`);
`Request timeout after ${timeout}ms for ${baseUrl}`
);
if (throwOnError) { if (throwOnError) {
reject(timeoutError); reject(timeoutError);
} else { } else {
@@ -348,7 +329,7 @@ export const TAxiosAdvancedPromise = (
success: false, success: false,
data: null, data: null,
response: null, response: null,
error: timeoutError, error: timeoutError
}); });
} }
}, timeout); }, timeout);
@@ -363,29 +344,22 @@ export const TAxiosAdvancedPromise = (
// onSuccess // onSuccess
(response) => { (response) => {
clearTimeout(timeoutId); clearTimeout(timeoutId);
console.log( console.log(`TAxiosPromise success on attempt ${attempts} for ${baseUrl}`);
`TAxiosPromise success on attempt ${attempts} for ${baseUrl}`
);
resolve({ resolve({
success: true, success: true,
data: response.data, data: response.data,
response: response, response: response,
error: null, error: null
}); });
}, },
// onFail // onFail
(error) => { (error) => {
clearTimeout(timeoutId); clearTimeout(timeoutId);
console.error( console.error(`TAxiosPromise error on attempt ${attempts} for ${baseUrl}:`, error);
`TAxiosPromise error on attempt ${attempts} for ${baseUrl}:`,
error
);
// 재시도 로직 // 재시도 로직
if (attempts < maxAttempts) { if (attempts < maxAttempts) {
console.log( console.log(`Retrying in ${retryDelay}ms... (${attempts}/${maxAttempts})`);
`Retrying in ${retryDelay}ms... (${attempts}/${maxAttempts})`
);
setTimeout(() => { setTimeout(() => {
attemptRequest(); attemptRequest();
}, retryDelay); }, retryDelay);
@@ -398,7 +372,7 @@ export const TAxiosAdvancedPromise = (
success: false, success: false,
data: null, data: null,
response: null, response: null,
error: error, error: error
}); });
} }
} }
@@ -412,40 +386,12 @@ export const TAxiosAdvancedPromise = (
}; };
// HTTP 메소드별 편의 함수들 (안전한 버전) // HTTP 메소드별 편의 함수들 (안전한 버전)
export const TAxiosGet = async ( export const TAxiosGet = async (dispatch, getState, baseUrl, urlParams = {}, options = {}) => {
dispatch, return await TAxiosPromise(dispatch, getState, 'get', baseUrl, urlParams, {}, options.noTokenRefresh);
getState,
baseUrl,
urlParams = {},
options = {}
) => {
return await TAxiosPromise(
dispatch,
getState,
"get",
baseUrl,
urlParams,
{},
options.noTokenRefresh
);
}; };
export const TAxiosPost = async ( export const TAxiosPost = async (dispatch, getState, baseUrl, params = {}, options = {}) => {
dispatch, return await TAxiosPromise(dispatch, getState, 'post', baseUrl, {}, params, options.noTokenRefresh);
getState,
baseUrl,
params = {},
options = {}
) => {
return await TAxiosPromise(
dispatch,
getState,
"post",
baseUrl,
{},
params,
options.noTokenRefresh
);
}; };
// 안전한 다중 요청 처리 // 안전한 다중 요청 처리
@@ -469,15 +415,15 @@ export const TAxiosAll = async (requests) => {
success: failedResults.length === 0, success: failedResults.length === 0,
successResults, successResults,
failedResults, failedResults,
allResults: results, allResults: results
}; };
} catch (error) { } catch (error) {
console.error("TAxiosAll unexpected error:", error); console.error('TAxiosAll unexpected error:', error);
return { return {
success: false, success: false,
successResults: [], successResults: [],
failedResults: [{ index: -1, error }], failedResults: [{ index: -1, error }],
allResults: [], allResults: []
}; };
} }
}; };
@@ -498,37 +444,33 @@ export const TAxiosSequential = async (requests) => {
} }
} catch (error) { } catch (error) {
errors.push({ index: i, error }); errors.push({ index: i, error });
console.error( console.error(`TAxiosSequential unexpected error at request ${i}:`, error);
`TAxiosSequential unexpected error at request ${i}:`,
error
);
} }
} }
return { return {
success: errors.length === 0, success: errors.length === 0,
results, results,
errors, errors
}; };
}; };
// 안전한 Redux Thunk 헬퍼 // 안전한 Redux Thunk 헬퍼
export const createSafeApiThunk = (apiCall) => { export const createSafeApiThunk = (apiCall) => {
return (...args) => return (...args) => async (dispatch, getState) => {
async (dispatch, getState) => { try {
try { const result = await apiCall(dispatch, getState, ...args);
const result = await apiCall(dispatch, getState, ...args); return result; // 이미 안전한 형태로 반환됨
return result; // 이미 안전한 형태로 반환됨 } catch (error) {
} catch (error) { console.error('API thunk unexpected error:', error);
console.error("API thunk unexpected error:", error); return {
return { success: false,
success: false, data: null,
data: null, response: null,
response: null, error
error, };
}; }
} };
};
}; };
// 실제 사용 예시들 (안전한 버전) // 실제 사용 예시들 (안전한 버전)
@@ -538,16 +480,16 @@ export const safeUsageExamples = {
const result = await TAxiosPromise( const result = await TAxiosPromise(
dispatch, dispatch,
getState, getState,
"get", 'get',
URLS.GET_HOME_TERMS, URLS.GET_HOME_TERMS,
{ trmsTpCdList: "MST00401, MST00402", mbrNo: "12345" } { trmsTpCdList: "MST00401, MST00402", mbrNo: "12345" }
); );
if (result.success) { if (result.success) {
console.log("Success:", result.data); console.log('Success:', result.data);
return result.data; return result.data;
} else { } else {
console.error("API call failed:", result.error); console.error('API call failed:', result.error);
// 에러를 throw하지 않고 기본값 반환하거나 사용자에게 안내 // 에러를 throw하지 않고 기본값 반환하거나 사용자에게 안내
return null; return null;
} }
@@ -555,21 +497,23 @@ export const safeUsageExamples = {
// 2. retCode 체크를 포함한 안전한 처리 // 2. retCode 체크를 포함한 안전한 처리
safeWithRetCodeCheck: async (dispatch, getState) => { safeWithRetCodeCheck: async (dispatch, getState) => {
const result = await TAxiosGet(dispatch, getState, URLS.GET_HOME_TERMS, { const result = await TAxiosGet(
trmsTpCdList: "MST00401, MST00402", dispatch,
mbrNo: "12345", getState,
}); URLS.GET_HOME_TERMS,
{ trmsTpCdList: "MST00401, MST00402", mbrNo: "12345" }
);
if (!result.success) { if (!result.success) {
console.error("Network error:", result.error); console.error('Network error:', result.error);
return { success: false, message: "네트워크 오류가 발생했습니다." }; return { success: false, message: '네트워크 오류가 발생했습니다.' };
} }
if (result.data.retCode !== 0) { if (result.data.retCode !== 0) {
console.error("API error:", result.data.retCode, result.data.retMsg); console.error('API error:', result.data.retCode, result.data.retMsg);
return { return {
success: false, success: false,
message: result.data.retMsg || "API 오류가 발생했습니다.", message: result.data.retMsg || 'API 오류가 발생했습니다.'
}; };
} }
@@ -581,27 +525,26 @@ export const safeUsageExamples = {
const requests = [ const requests = [
TAxiosGet(dispatch, getState, URLS.GET_HOME_TERMS, { mbrNo: "12345" }), TAxiosGet(dispatch, getState, URLS.GET_HOME_TERMS, { mbrNo: "12345" }),
TAxiosGet(dispatch, getState, URLS.GET_USER_INFO, { mbrNo: "12345" }), TAxiosGet(dispatch, getState, URLS.GET_USER_INFO, { mbrNo: "12345" }),
TAxiosPost(dispatch, getState, URLS.UPDATE_SETTINGS, { TAxiosPost(dispatch, getState, URLS.UPDATE_SETTINGS, { setting: "value" })
setting: "value",
}),
]; ];
const result = await TAxiosAll(requests); const result = await TAxiosAll(requests);
if (result.success) { if (result.success) {
console.log("All requests succeeded"); console.log('All requests succeeded');
return result.successResults.map((item) => item.result); return result.successResults.map(item => item.result);
} else { } else {
console.error("Some requests failed:", result.failedResults); console.error('Some requests failed:', result.failedResults);
// 부분적 성공도 처리 가능 // 부분적 성공도 처리 가능
return { return {
successData: result.successResults.map((item) => item.result), successData: result.successResults.map(item => item.result),
errors: result.failedResults, errors: result.failedResults
}; };
} }
}, }
}; };
// 컴포넌트에서의 안전한 사용법 // 컴포넌트에서의 안전한 사용법
export const ComponentUsageExample = () => { export const ComponentUsageExample = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
@@ -629,7 +572,7 @@ export const ComponentUsageExample = () => {
return ( return (
<div> <div>
<button onClick={handleFetchTerms} disabled={loading}> <button onClick={handleFetchTerms} disabled={loading}>
{loading ? "로딩 중..." : "약관 정보 가져오기"} {loading ? '로딩 중...' : '약관 정보 가져오기'}
</button> </button>
{error && <div className="error-message">{error}</div>} {error && <div className="error-message">{error}</div>}
</div> </div>

View File

@@ -167,29 +167,22 @@ export const getSystemSettings = (
}; };
export function checkValidCountry(ricCode, country) { export function checkValidCountry(ricCode, country) {
// 🔍 DEEPLINK DEBUG: 국가 유효성 검사
console.log("🔍 [DEEPLINK DEBUG] ===== checkValidCountry 실행 =====");
console.log("🔍 [DEEPLINK DEBUG] ricCode:", ricCode);
console.log("🔍 [DEEPLINK DEBUG] country:", country);
let result = false;
if (ricCode === "aic") { if (ricCode === "aic") {
result = country === "US"; if (country === "US") return true;
console.log("🔍 [DEEPLINK DEBUG] AIC 지역 - US 검사 결과:", result); else return false;
} else if (ricCode === "eic") { } else if (ricCode === "eic") {
result = country === "GB" || country === "DE"; if (country === "GB" || country === "DE") return true;
console.log("🔍 [DEEPLINK DEBUG] EIC 지역 - GB/DE 검사 결과:", result); else return false;
} else if (ricCode === "ruc") { } else if (ricCode === "ruc") {
result = country === "RU"; if (country === "RU") return true;
console.log("🔍 [DEEPLINK DEBUG] RUC 지역 - RU 검사 결과:", result); else return false;
} else { } else {
result = country === "US"; if (country === "US") {
console.log("🔍 [DEEPLINK DEBUG] 기타 지역 - US 기본값 검사 결과:", result); return true;
} else {
return false;
}
} }
console.log("🔍 [DEEPLINK DEBUG] 최종 유효성 검사 결과:", result);
return result;
} }
// 3.0 ~ 4.5 // 3.0 ~ 4.5

View File

@@ -150,56 +150,21 @@ let localLaunchParams = {
export const getLaunchParams = () => { export const getLaunchParams = () => {
let params = {}; let params = {};
// 🔍 DEEPLINK DEBUG: Launch Parameters 파싱 과정 확인
console.log("🔍 [DEEPLINK DEBUG] ===== getLaunchParams 실행 =====");
console.log(
"🔍 [DEEPLINK DEBUG] window 객체 존재:",
typeof window === "object"
);
console.log(
"🔍 [DEEPLINK DEBUG] PalmSystem 존재:",
!!(typeof window === "object" && window.PalmSystem)
);
console.log(
"🔍 [DEEPLINK DEBUG] launchParams 존재:",
!!(
typeof window === "object" &&
window.PalmSystem &&
window.PalmSystem.launchParams
)
);
if ( if (
typeof window === "object" && typeof window === "object" &&
window.PalmSystem && window.PalmSystem &&
window.PalmSystem.launchParams window.PalmSystem.launchParams
) { ) {
console.log(
"🔍 [DEEPLINK DEBUG] 원본 launchParams:",
window.PalmSystem.launchParams
);
try { try {
params = JSON.parse(window.PalmSystem.launchParams); params = JSON.parse(window.PalmSystem.launchParams);
console.log("🔍 [DEEPLINK DEBUG] JSON 파싱 성공:", params);
if (params["x-webos-app-container-launch"] === true) { if (params["x-webos-app-container-launch"] === true) {
console.log(
"🔍 [DEEPLINK DEBUG] x-webos-app-container-launch 감지 - details 사용"
);
params = params.details; params = params.details;
console.log("🔍 [DEEPLINK DEBUG] details 파라미터:", params);
} }
} catch (e) { } catch (e) {
console.log("🔍 [DEEPLINK DEBUG] ❌ JSON 파싱 실패:", e);
params = {}; params = {};
} }
console.log("🔍 [DEEPLINK DEBUG] ✅ 최종 params:", params);
return params; return params;
} else { } else {
console.log(
"🔍 [DEEPLINK DEBUG] ⚠️ PalmSystem 없음 - localLaunchParams 사용"
);
console.log("🔍 [DEEPLINK DEBUG] localLaunchParams:", localLaunchParams);
return localLaunchParams; return localLaunchParams;
} }
}; };

View File

@@ -499,7 +499,7 @@ const HomePanel = ({ isOnTop }) => {
); );
dispatch(getTop20Show()); dispatch(getTop20Show());
dispatch(getBestSeller(bestSellerLoaded)); dispatch(getBestSeller(bestSellerLoaded));
console.log("###isDeepLink", isDeepLink);
if (isDeepLink) { if (isDeepLink) {
dispatch(setDeepLink({ contentTarget: "", isDeepLink: false })); dispatch(setDeepLink({ contentTarget: "", isDeepLink: false }));
} }

View File

@@ -170,15 +170,6 @@ export default function MainView({ className, initService }) {
(state) => state.common.appStatus.isInternetConnected (state) => state.common.appStatus.isInternetConnected
); );
// 🔍 DEEPLINK DEBUG: 딥링크 디버깅을 위한 추가 상태들
const contentTarget = useSelector(
(state) => state.common.deepLink?.contentTarget
);
const introTermsAgree = useSelector((state) => state.common.introTermsAgree);
const deviceRegistered = useSelector(
(state) => state.common.deviceRegistered
);
const deviceCountryCode = httpHeader?.["X-Device-Country"] || ""; const deviceCountryCode = httpHeader?.["X-Device-Country"] || "";
const isLogSentRef = useRef(false); const isLogSentRef = useRef(false);
const watchRecord = useSelector((state) => state.localSettings?.watchRecord); const watchRecord = useSelector((state) => state.localSettings?.watchRecord);
@@ -190,23 +181,6 @@ export default function MainView({ className, initService }) {
const topPanel = panels[panels.length - 1]; const topPanel = panels[panels.length - 1];
// 🔍 DEEPLINK DEBUG: 딥링크 관련 상태 변화 추적
useEffect(() => {
console.log("🔍 [DEEPLINK DEBUG] ===== MainView 상태 변화 =====");
console.log("🔍 [DEEPLINK DEBUG] contentTarget:", contentTarget);
console.log("🔍 [DEEPLINK DEBUG] httpHeader 존재:", !!httpHeader);
console.log("🔍 [DEEPLINK DEBUG] deviceRegistered:", deviceRegistered);
console.log("🔍 [DEEPLINK DEBUG] introTermsAgree:", introTermsAgree);
console.log(
"🔍 [DEEPLINK DEBUG] 현재 패널:",
panels[panels.length - 1]?.name
);
console.log(
"🔍 [DEEPLINK DEBUG] 딥링크 실행 가능:",
!!(contentTarget && httpHeader && deviceRegistered && introTermsAgree)
);
}, [contentTarget, httpHeader, deviceRegistered, introTermsAgree, panels]);
useEffect(() => { useEffect(() => {
console.log("🔍 MainView 팝업 상태 변경:", { console.log("🔍 MainView 팝업 상태 변경:", {
popupVisible, popupVisible,
@@ -855,7 +829,7 @@ export default function MainView({ className, initService }) {
/> />
)} */} )} */}
{/* /딥링크 테스트 */} {/* /딥링크 테스트 */}
<div {/* <div
style={{ style={{
position: "fixed", position: "fixed",
left: "0", left: "0",
@@ -866,182 +840,9 @@ export default function MainView({ className, initService }) {
zIndex: "999", zIndex: "999",
}} }}
> >
<div style={{ fontSize: "13px", lineHeight: "1.3" }}> deepLinkInfo
<h3 style={{ color: "#00ff00", marginBottom: "8px" }}> <p>{contentTarget}</p>
🔍 딥링크 디버깅 정보 </div> */}
</h3>
{/* 딥링크 실행 상태 종합 판단 */}
<div
style={{
marginBottom: "10px",
padding: "6px",
backgroundColor:
contentTarget &&
httpHeader &&
deviceRegistered &&
introTermsAgree
? "#004400"
: "#440000",
border:
"1px solid " +
(contentTarget &&
httpHeader &&
deviceRegistered &&
introTermsAgree
? "#00ff00"
: "#ff0000"),
borderRadius: "4px",
}}
>
<strong>🎯 딥링크 실행 가능 여부:</strong> <br />
<span
style={{
color:
contentTarget &&
httpHeader &&
deviceRegistered &&
introTermsAgree
? "#00ff00"
: "#ff0000",
fontSize: "16px",
}}
>
{contentTarget &&
httpHeader &&
deviceRegistered &&
introTermsAgree
? "✅ 실행 가능"
: "❌ 실행 불가"}
</span>
</div>
<div style={{ marginBottom: "6px" }}>
<strong>📱 contentTarget:</strong> <br />
<span
style={{
color: contentTarget ? "#00ff00" : "#ff0000",
fontSize: "11px",
}}
>
{contentTarget || "❌ 없음"}
</span>
</div>
<div style={{ marginBottom: "6px" }}>
<strong>🌍 HTTP Header:</strong>
<span
style={{
color: httpHeader ? "#00ff00" : "#ff0000",
marginLeft: "8px",
}}
>
{httpHeader ? "✅" : "❌"}
</span>
{httpHeader && (
<div
style={{
fontSize: "11px",
marginTop: "2px",
paddingLeft: "10px",
}}
>
{httpHeader["X-Device-Country"] || "국가미설정"} /{" "}
{httpHeader["X-Device-Language"] || "언어미설정"}
</div>
)}
</div>
<div style={{ marginBottom: "6px" }}>
<strong>🔧 현재 패널:</strong>
<span
style={{ color: "#00ff00", marginLeft: "8px", fontSize: "11px" }}
>
{panels?.length > 0
? panels[panels.length - 1]?.name || "이름없음"
: "없음"}
</span>
<span
style={{ fontSize: "10px", color: "#888", marginLeft: "4px" }}
>
( {panels?.length || 0})
</span>
</div>
<div style={{ marginBottom: "6px" }}>
<strong> 필수 조건:</strong> <br />
<div style={{ fontSize: "11px", paddingLeft: "10px" }}>
webOS: {webOSVersion || "❓"}
<span
style={{
color:
webOSVersion && Number(webOSVersion) >= 4
? "#00ff00"
: "#ff0000",
marginLeft: "4px",
}}
>
{webOSVersion && Number(webOSVersion) >= 4 ? "✅" : "❌"}
</span>{" "}
<br /> 디바이스:
<span
style={{
color: deviceRegistered ? "#00ff00" : "#ff0000",
marginLeft: "4px",
}}
>
{deviceRegistered ? "✅" : "❌"}
</span>{" "}
<br /> 약관동의:
<span
style={{
color: introTermsAgree ? "#00ff00" : "#ff0000",
marginLeft: "4px",
}}
>
{introTermsAgree ? "✅" : "❌"}
</span>
</div>
</div>
<div style={{ marginBottom: "6px" }}>
<strong>🚨 에러:</strong>
<span
style={{
color: errorCode ? "#ff0000" : "#00ff00",
marginLeft: "8px",
}}
>
{errorCode ? `${errorCode}` : "✅ 정상"}
</span>
</div>
<div style={{ marginBottom: "6px" }}>
<strong>🌐 연결상태:</strong>
<span
style={{
color: isInternetConnected ? "#00ff00" : "#ff0000",
marginLeft: "8px",
}}
>
{isInternetConnected ? "✅ 연결됨" : "❌ 연결안됨"}
</span>
</div>
<div
style={{
fontSize: "10px",
color: "#888",
marginTop: "8px",
borderTop: "1px solid #333",
paddingTop: "4px",
}}
>
💡 콘솔에서 "🔍 [DEEPLINK DEBUG]" 로그를 확인하세요 <br />
🕒 {new Date().toLocaleTimeString()}
</div>
</div>
</div>
</div> </div>
); );
} }