[주문결제 SHOPTIME-3971] ShopLC 라이브 full 화면 QR코드
[수정사항] Player Full 화면에서 ShopLC라이브 상품 QRCode는 해당 브랜드 페이지가아닌 ShopTime 구매페이지로 연결되도록 QRCode 수정
This commit is contained in:
@@ -5,10 +5,19 @@ import { useSelector } from "react-redux";
|
||||
|
||||
import TQRCode from "../../../components/TQRCode/TQRCode";
|
||||
import css from "./PlayerOverlayQRCode.module.less";
|
||||
import { scaleH, scaleW } from "../../../utils/helperMethods";
|
||||
import { getQRCodeUrl, scaleH, scaleW } from "../../../utils/helperMethods";
|
||||
|
||||
export default function PlayerOverlayQRCode({ qrCurrentItem, type, modalScale }) {
|
||||
export default function PlayerOverlayQRCode({
|
||||
qrCurrentItem,
|
||||
type,
|
||||
modalScale,
|
||||
}) {
|
||||
const { cntry_cd } = useSelector((state) => state.common.httpHeader);
|
||||
const deviceInfo = useSelector((state) => state.device.deviceInfo);
|
||||
|
||||
const serverHOST = useSelector((state) => state.common.appStatus.serverHOST);
|
||||
const serverType = useSelector((state) => state.localSettings.serverType);
|
||||
const { entryMenu, nowMenu } = useSelector((state) => state.common.menu);
|
||||
|
||||
const label = useMemo(() => {
|
||||
let text = "";
|
||||
@@ -76,9 +85,30 @@ export default function PlayerOverlayQRCode({ qrCurrentItem, type, modalScale })
|
||||
return { width: "156", height: "156" };
|
||||
}, [cntry_cd]);
|
||||
|
||||
const { detailUrl } = useMemo(() => {
|
||||
return getQRCodeUrl({
|
||||
serverHOST,
|
||||
serverType,
|
||||
index: deviceInfo?.dvcIndex,
|
||||
patnrId: qrCurrentItem?.patnrId,
|
||||
prdtId: qrCurrentItem?.prdtId,
|
||||
entryMenu: entryMenu,
|
||||
nowMenu: nowMenu,
|
||||
liveFlag: "Y",
|
||||
qrType: "billingDetail",
|
||||
});
|
||||
}, [serverHOST, serverType, deviceInfo, entryMenu, nowMenu, qrCurrentItem]);
|
||||
|
||||
const QRCodeUrl = useMemo(() => {
|
||||
if (type === "LIVE" && qrCurrentItem?.patncNm === "ShopLC") {
|
||||
return detailUrl;
|
||||
}
|
||||
return qrCurrentItem?.qrcodeUrl;
|
||||
}, [detailUrl, qrCurrentItem, type]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{innerStylePosition && qrCurrentItem?.qrcodeUrl && (
|
||||
{innerStylePosition && QRCodeUrl && (
|
||||
<div
|
||||
className={classNames(
|
||||
css.container,
|
||||
@@ -91,7 +121,7 @@ export default function PlayerOverlayQRCode({ qrCurrentItem, type, modalScale })
|
||||
>
|
||||
<div>
|
||||
<TQRCode
|
||||
text={qrCurrentItem?.qrcodeUrl}
|
||||
text={QRCodeUrl}
|
||||
width={width}
|
||||
height={height}
|
||||
ariaLabel="QR CODE, “SCAN TO SHOP” go to Shoptime App"
|
||||
|
||||
Reference in New Issue
Block a user