[주문결제] detail Buy now 클릭 시에 refresh 되어 qr code 적재되지 않던 현상 수정
This commit is contained in:
@@ -9,7 +9,8 @@ export const getMyInfoCheckoutInfo =
|
|||||||
const { mbrNo, dirPurcSelYn, cartList } = props;
|
const { mbrNo, dirPurcSelYn, cartList } = props;
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
|
// changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
|
||||||
|
changeAppStatus({ isLoading: true })
|
||||||
);
|
);
|
||||||
|
|
||||||
const onSuccess = (response) => {
|
const onSuccess = (response) => {
|
||||||
|
|||||||
@@ -1,24 +1,36 @@
|
|||||||
import React, { useCallback, useRef, useEffect } from "react";
|
import React, { useCallback, useEffect, useRef } from "react";
|
||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
|
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
||||||
import { Cancelable } from "@enact/ui/Cancelable";
|
import { Cancelable } from "@enact/ui/Cancelable";
|
||||||
|
|
||||||
import { popPanel } from "../../actions/panelActions";
|
import { popPanel } from "../../actions/panelActions";
|
||||||
import { SpotlightIds } from "../../utils/SpotlightIds";
|
import { SpotlightIds } from "../../utils/SpotlightIds";
|
||||||
import SmoodShowingAnimation from "../SmoodShowingAnimation/SmoodShowingAnimation";
|
import SmoodShowingAnimation from "../SmoodShowingAnimation/SmoodShowingAnimation";
|
||||||
import css from "./TPanel.module.less";
|
import css from "./TPanel.module.less";
|
||||||
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
|
|
||||||
|
|
||||||
const CancelablePanel = Cancelable({ modal: true, onCancel: "handleCancel" }, SpotlightContainerDecorator({ enterTo: "last-focused" }, "div"));
|
const CancelablePanel = Cancelable(
|
||||||
|
{ modal: true, onCancel: "handleCancel" },
|
||||||
|
SpotlightContainerDecorator({ enterTo: "last-focused" }, "div")
|
||||||
|
);
|
||||||
|
|
||||||
const PERFORMANCE_CHECHING_TIME = 200; //ms
|
const PERFORMANCE_CHECHING_TIME = 200; //ms
|
||||||
const PERFORMANCE_CHECHING_COUNT = 7;
|
const PERFORMANCE_CHECHING_COUNT = 7;
|
||||||
const TPanel = ({ className, children, handleCancel, isTabActivated = true, spotlightId = SpotlightIds.TPANEL, isOnTop = false, ...rest }) => {
|
const TPanel = ({
|
||||||
|
className,
|
||||||
|
children,
|
||||||
|
handleCancel,
|
||||||
|
isTabActivated = true,
|
||||||
|
spotlightId = SpotlightIds.TPANEL,
|
||||||
|
isOnTop = false,
|
||||||
|
...rest
|
||||||
|
}) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const isGnbOpened = useSelector((state) => state.common.isGnbOpened);
|
const isGnbOpened = useSelector((state) => state.common.isGnbOpened);
|
||||||
|
const isLoading = useSelector((state) => state.common.appStatus.isLoading);
|
||||||
|
|
||||||
const onCancel = useCallback(
|
const onCancel = useCallback(
|
||||||
(e) => {
|
(e) => {
|
||||||
@@ -41,8 +53,13 @@ const TPanel = ({ className, children, handleCancel, isTabActivated = true, spot
|
|||||||
{...rest}
|
{...rest}
|
||||||
id={SpotlightIds.TPANEL}
|
id={SpotlightIds.TPANEL}
|
||||||
handleCancel={onCancel}
|
handleCancel={onCancel}
|
||||||
className={classNames(css.tpanelmain, isTabActivated && css.isTabActivated, className)}
|
className={classNames(
|
||||||
|
css.tpanelmain,
|
||||||
|
isTabActivated && css.isTabActivated,
|
||||||
|
className
|
||||||
|
)}
|
||||||
spotlightId={spotlightId}
|
spotlightId={spotlightId}
|
||||||
|
spotlightDisabled={isLoading}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</CancelablePanel>
|
</CancelablePanel>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ export default function SingleOption({
|
|||||||
};
|
};
|
||||||
|
|
||||||
setPrdtData(params);
|
setPrdtData(params);
|
||||||
}, []);
|
}, [selectedPatnrId, selectedPrdtId, selectedOptions, quantity]);
|
||||||
|
|
||||||
const logInfo = useMemo(() => {
|
const logInfo = useMemo(() => {
|
||||||
if (productData) {
|
if (productData) {
|
||||||
@@ -388,7 +388,8 @@ export default function SingleOption({
|
|||||||
response.data.shippingAddressList.length === 0
|
response.data.shippingAddressList.length === 0
|
||||||
) {
|
) {
|
||||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||||
|
dispatch(changeAppStatus({ isLoading: false }));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@@ -406,10 +407,12 @@ export default function SingleOption({
|
|||||||
}
|
}
|
||||||
} else if (response.retCode === 1001) {
|
} else if (response.retCode === 1001) {
|
||||||
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
dispatch(setShowPopup(Config.ACTIVE_POPUP.qrPopup));
|
||||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||||
|
dispatch(changeAppStatus({ isLoading: false }));
|
||||||
} else {
|
} else {
|
||||||
dispatch(showError(response.retCode, response.retMsg, false));
|
dispatch(showError(response.retCode, response.retMsg, false));
|
||||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||||
|
dispatch(changeAppStatus({ isLoading: false }));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user