|
@@ -33,24 +33,38 @@ const Page = () => {
|
|
|
const goBlack = () => {
|
|
|
router.push("/")
|
|
|
}
|
|
|
+ const [showClose, setShowClose] = useState<boolean>(false);
|
|
|
+ useEffect(() => {
|
|
|
+ const iframe_game: any = document.getElementById('iframe_game');
|
|
|
+ iframe_game.addEventListener('load', () => { setShowClose(true) });
|
|
|
+ return () => iframe_game.removeEventListener("load", () => { setShowClose(true) });
|
|
|
+ }, []);
|
|
|
+
|
|
|
return (
|
|
|
<>
|
|
|
- <div style={{ width: "100%", height: "100%" }}>
|
|
|
+ <div style={{ width: "100%", height: "100%", backgroundColor: "#000" }}>
|
|
|
+ <iframe id="iframe_game" src={url} width={"100%"} height={"100%"} style={{paddingBottom: '.4rem'}}></iframe>
|
|
|
{/* 真人游戏添加关闭按钮 */}
|
|
|
{
|
|
|
- categoryName === "Live Casino Jogos" && <i
|
|
|
- className={"iconfont icon-guanbi"}
|
|
|
+ showClose && ["Live Casino Jogos", 'PG'].includes(categoryName) && <div
|
|
|
style={{
|
|
|
position: 'fixed',
|
|
|
- top: '0.1rem',
|
|
|
- right: '0.1rem',
|
|
|
+ bottom: '0',
|
|
|
+ right: '0',
|
|
|
zIndex: "99999",
|
|
|
- fontSize: '.2rem'
|
|
|
+ width: "100%",
|
|
|
+ height: ".4rem",
|
|
|
+ display: "flex",
|
|
|
+ alignItems: "center",
|
|
|
+ justifyContent: "center",
|
|
|
+ backgroundColor: "#000"
|
|
|
}}
|
|
|
onClick={goBlack}
|
|
|
- ></i>
|
|
|
+ >
|
|
|
+ {/* <i className={"iconfont icon-guanbi"} style={{ fontSize: '.2rem'}}></i> */}
|
|
|
+ <img src="/close_login.png" alt="" style={{ width: '.22rem'}}/>
|
|
|
+ </div>
|
|
|
}
|
|
|
- <iframe src={url} width={"100%"} height={"100%"}></iframe>
|
|
|
</div>
|
|
|
|
|
|
{/* 数千补偿 */}
|