[국가코드 체크] 에러 코드로 변경
This commit is contained in:
@@ -152,16 +152,23 @@ export const TAxios = (
|
||||
}
|
||||
// 602 요청 국가 불일치
|
||||
if (res?.data?.retCode === 602) {
|
||||
dispatch(setShowPopup(ACTIVE_POPUP.changeCountyPopup));
|
||||
Spotlight.focus("tPopupBtn1");
|
||||
dispatch(
|
||||
setShowPopup(ACTIVE_POPUP.changeCountyPopup, {
|
||||
data: res.data.retCode,
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
// 603 서비스 국가 아님
|
||||
if (res?.data?.retCode === 603) {
|
||||
dispatch(setShowPopup(ACTIVE_POPUP.unSupportedCountryPopup));
|
||||
Spotlight.focus("tPopupBtn1");
|
||||
dispatch(
|
||||
setShowPopup(ACTIVE_POPUP.unSupportedCountryPopup, {
|
||||
data: res.data.retCode,
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (res?.data?.retCode === 604) {
|
||||
//todo "NotServiceLanguage"
|
||||
return;
|
||||
|
||||
@@ -230,13 +230,11 @@ export default function MainView({ className }) {
|
||||
const handlePopupClick = useCallback(() => {
|
||||
// 602 지원하지 않는 국가
|
||||
if (activePopup === Config.ACTIVE_POPUP.unSupportedCountryPopup) {
|
||||
dispatch(setHidePopup());
|
||||
return dispatch(setExitApp());
|
||||
}
|
||||
|
||||
// 603 국가 변경
|
||||
if (activePopup === Config.ACTIVE_POPUP.changeCountyPopup) {
|
||||
dispatch(setHidePopup());
|
||||
// dispatch(
|
||||
// getHomeTerms({
|
||||
// mbrNo: appStatus.loginUserData.userNumber,
|
||||
@@ -255,7 +253,6 @@ export default function MainView({ className }) {
|
||||
|
||||
const handlePopupClose = useCallback(() => {
|
||||
dispatch(setExitApp());
|
||||
dispatch(setHidePopup());
|
||||
}, [dispatch]);
|
||||
|
||||
const getMessageByPopupType = (type) => {
|
||||
@@ -527,9 +524,13 @@ export default function MainView({ className }) {
|
||||
}, [httpHeader, sendLogIfNeeded]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activePopup === Config.ACTIVE_POPUP.networkErrorPopup) {
|
||||
if (
|
||||
activePopup === Config.ACTIVE_POPUP.networkErrorPopup ||
|
||||
activePopup === Config.ACTIVE_POPUP.changeCountyPopup ||
|
||||
activePopup === Config.ACTIVE_POPUP.unSupportedCountryPopup
|
||||
) {
|
||||
const timeoutId = setTimeout(() => {
|
||||
Spotlight.focus(SpotlightIds.TPOPUP);
|
||||
Spotlight.focus("tPopupBtn1");
|
||||
}, 0);
|
||||
|
||||
return () => clearTimeout(timeoutId);
|
||||
@@ -542,21 +543,24 @@ export default function MainView({ className }) {
|
||||
onLoadComplete={onPreImageLoadComplete}
|
||||
/>
|
||||
<LoadingPanel showLoadingPanel={showLoadingPanel} />
|
||||
{loadingComplete && (
|
||||
<div
|
||||
className={classNames(
|
||||
css.container
|
||||
// showLoadingPanel.type === "launching" ? css.transparent : null
|
||||
)}
|
||||
>
|
||||
<div className={classNames(css.mainlayout)}>{renderTopPanel()}</div>
|
||||
<TabLayout
|
||||
topPanelName={topPanelName}
|
||||
onTabActivated={onTabActivated}
|
||||
panelInfo={currentTabLayoutPanelInfo}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{errorCode !== 502 &&
|
||||
errorCode !== 602 &&
|
||||
errorCode !== 603 &&
|
||||
loadingComplete && (
|
||||
<div
|
||||
className={classNames(
|
||||
css.container
|
||||
// showLoadingPanel.type === "launching" ? css.transparent : null
|
||||
)}
|
||||
>
|
||||
<div className={classNames(css.mainlayout)}>{renderTopPanel()}</div>
|
||||
<TabLayout
|
||||
topPanelName={topPanelName}
|
||||
onTabActivated={onTabActivated}
|
||||
panelInfo={currentTabLayoutPanelInfo}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{isLoading && <Loader />}
|
||||
|
||||
{/* 시청예약 알림 팝업 */}
|
||||
@@ -596,11 +600,12 @@ export default function MainView({ className }) {
|
||||
/>
|
||||
)}
|
||||
|
||||
{((loadingComplete &&
|
||||
activePopup === Config.ACTIVE_POPUP.unSupportedCountryPopup) ||
|
||||
(loadingComplete &&
|
||||
activePopup === Config.ACTIVE_POPUP.changeCountyPopup)) && (
|
||||
{activePopup === Config.ACTIVE_POPUP.unSupportedCountryPopup ||
|
||||
activePopup === Config.ACTIVE_POPUP.changeCountyPopup ? (
|
||||
<TPopUp
|
||||
kind="textPopup"
|
||||
hasButton
|
||||
hasText
|
||||
button1Text={
|
||||
activePopup !== Config.ACTIVE_POPUP.unSupportedCountryPopup
|
||||
? $L(STRING_CONF.YES)
|
||||
@@ -610,16 +615,13 @@ export default function MainView({ className }) {
|
||||
activePopup == Config.ACTIVE_POPUP.changeCountyPopup &&
|
||||
$L(STRING_CONF.NO)
|
||||
}
|
||||
hasButton
|
||||
hasText
|
||||
kind="textPopup"
|
||||
onClick={handlePopupClick}
|
||||
onClose={handlePopupClose}
|
||||
open={popupVisible}
|
||||
text={getMessageByPopupType(activePopup)}
|
||||
title={$L("Exit Shop Time")}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
<SystemNotification />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user