Просмотр исходного кода

fix: 修改真人视讯显示退出按钮

Before 6 месяцев назад
Родитель
Сommit
bb650abb03

+ 1 - 1
.env.development

@@ -2,7 +2,7 @@
 #baseurl
 # NEXT_PUBLIC_BASE_URL=http://192.168.0.71:8800
 NEXT_PUBLIC_BASE_URL=http://192.168.0.84:8800
-#NEXT_PUBLIC_BASE_URL=https://server-webapi.tiktokjakjkl.icu
+#NEXT_PUBLIC_BASE_URL=https://3rd-api.tiktokjakjkl.icu
 #share link
 NEXT_PUBLIC_SHARE_URL=http://192.168.0.84:3000
 

+ 1 - 1
.env.local

@@ -2,7 +2,7 @@
 #baseurl
 # NEXT_PUBLIC_BASE_URL=http://192.168.0.71:8800
 NEXT_PUBLIC_BASE_URL=http://192.168.0.84:8800
-#NEXT_PUBLIC_BASE_URL=https://server-webapi.tiktokjakjkl.icu
+#NEXT_PUBLIC_BASE_URL=https://3rd-api.tiktokjakjkl.icu
 #share link
 NEXT_PUBLIC_SHARE_URL=http://192.168.0.84:3000
 

BIN
public/redpacket/isEndBg.png


+ 2 - 1
src/app/[locale]/(TabBar)/[[...share]]/@prizeWidget/page.tsx

@@ -10,6 +10,7 @@ const getPrizeApi = () => {
 };
 const Page = async () => {
     const result = await getPrizeApi();
-    return <HomePrize data={result.data}></HomePrize>;
+    if (!result.data) return null;
+    return <HomePrize data={result.data ?? []}></HomePrize>;
 };
 export default Page;

+ 23 - 14
src/app/[locale]/(TabBar)/profile/component/ItemCom/index.tsx

@@ -24,7 +24,7 @@ const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
         userUnread: state.userUnred,
     }));
     const links = [
-        { label: "gratis", desc: "gratisDesc", icon: "", url: "/", content: null },
+        // { label: "gratis", desc: "gratisDesc", icon: "", url: "/", content: null },
         {
             label: "company",
             desc: "",
@@ -49,18 +49,30 @@ const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
             url: "/cashback",
             content: null,
         },
-        { label: "gamblingBets", desc: "", icon: "", url: "/betrecord", content: null },
-        // { label: "league", desc: "", icon: "", url: "/", content: null },
-        // { label: "instant", desc: "", icon: "", url: "/", content: null },
-        { label: "transactions", desc: "", icon: "", url: "/transactions", content: null },
+        {
+            label: "gamblingBets",
+            desc: "",
+            color: "#30ceef",
+            icon: "icon-fuzhiwendang",
+            url: "/betrecord",
+            content: null,
+        },
+        {
+            label: "transactions",
+            desc: "",
+            color: "#3cd9a1",
+            icon: "icon-jiaoyi",
+            url: "/transactions",
+            content: null,
+        },
         {
             label: "message",
             desc: "",
-            icon: "",
+            icon: "icon-xiaoxi3-copy",
+            color: "#30ceef",
             url: "/notification",
             content: unread || userUnread ? Badge.dot : null,
         },
-        // { label: "initial", desc: "", icon: "", url: "/", content: null },
     ];
     const routerHandler = (item: any) => {
         if (item.url === "/cashWheel") {
@@ -75,22 +87,19 @@ const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
             router.push(item.url);
         }
     };
+
     return (
         <div className="itemCom-box">
             {links.map((item, index) => (
-                <div
-                    className={`${index == 0 ? "free" : ""} box-item`}
-                    onClick={() => routerHandler(item)}
-                    key={index}
-                >
+                <div className={`box-item`} onClick={() => routerHandler(item)} key={index}>
                     <div className={`${item.desc ? "box-item__left" : ""}`}>
                         <Badge content={item.content}>
                             <div className="content">
-                                {t(item.label)}
                                 <i
                                     className={`iconfont ${item.icon}`}
-                                    style={{ color: item.color }}
+                                    style={{ color: item.color, fontSize: "16px" }}
                                 ></i>
+                                {t(item.label)}
                             </div>
                             {item.desc && <p className={"desc"}>{t(item.desc)}</p>}
                         </Badge>

+ 1 - 0
src/app/[locale]/(TabBar)/profile/component/ItemCom/style.scss

@@ -16,6 +16,7 @@
     -ms-flex-pack: justify;
     justify-content: space-between;
     line-height: .2rem;
+
     &:last-child{
       border-bottom: none;
     }

+ 1 - 0
src/app/[locale]/(TabBar)/profile/component/ModalCom/index.tsx

@@ -38,6 +38,7 @@ const ModalCom: FC<PropsWithChildren<ItemComProps>> = () => {
 
             {
                 <span className="logOut" onClick={() => setVisible(true)}>
+                    <i className={"iconfont icon-tuichu mr-[5px] text-[24px]"}></i>
                     {t("Sair")}
                 </span>
             }

+ 3 - 1
src/app/[locale]/(TabBar)/profile/component/ModalCom/style.scss

@@ -4,10 +4,12 @@
   width: 1rem;
   height: .34rem;
   line-height: .34rem;
-  display: block;
   margin: .5rem auto .3rem;
   text-align: center;
   cursor: pointer;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 
 .body1-box {

+ 29 - 18
src/app/[locale]/game/page.tsx

@@ -25,46 +25,57 @@ const Page = () => {
     }, []);
 
     // 关闭iframe弹窗
-    const [categoryName, setCategoryName] = useState<string>("")
+    const [categoryName, setCategoryName] = useState<string>("");
     useEffect(() => {
-        const parmas: any = new URLSearchParams(url)
-        setCategoryName(parmas.get('category_name'))
+        const parmas: any = new URLSearchParams(url);
+        setCategoryName(parmas.get("category_name"));
     }, [url]);
     const goBlack = () => {
-        router.push("/")
-    }
+        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) });
+        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%", backgroundColor: "#000" }}>
-                <iframe id="iframe_game" src={url} width={"100%"} height={"100%"} style={{paddingBottom: '.5rem'}}></iframe>
+                <iframe
+                    id="iframe_game"
+                    src={url}
+                    width={"100%"}
+                    height={"100%"}
+                    style={{ paddingBottom: ".5rem" }}
+                ></iframe>
                 {/* 真人游戏添加关闭按钮 */}
-                {
-                    showClose && ["Live Casino Jogos", 'PG'].includes(categoryName) && <div 
+                {showClose && ["evolution", "PG"].includes(categoryName) && (
+                    <div
                         style={{
-                            position: 'fixed',
-                            bottom: '0',
-                            right: '0',
+                            position: "fixed",
+                            bottom: "0",
+                            right: "0",
                             zIndex: "99999",
                             width: "100%",
                             height: ".5rem",
                             display: "flex",
                             alignItems: "center",
                             justifyContent: "center",
-                            backgroundColor: "#000"
-                        }} 
+                            backgroundColor: "#000",
+                        }}
                         onClick={goBlack}
                     >
                         {/* <i className={"iconfont icon-guanbi"} style={{ fontSize: '.2rem'}}></i>    */}
-                        <img src="/close_login.png" alt="" style={{ width: '.22rem'}}/>
+                        <img src="/close_login.png" alt="" style={{ width: ".22rem" }} />
                     </div>
-                }
+                )}
             </div>
 
             {/* 数千补偿 */}

+ 29 - 28
src/components/Card/Card.tsx

@@ -1,16 +1,16 @@
 "use client";
 import { Category, GameListRep, GameRequest } from "@/api/home";
+import { userInfoApi } from "@/api/login";
 import Box from "@/components/Box";
 import useGame from "@/hooks/useGame";
 import { useRouter } from "@/i18n/routing";
 import { useWalletStore } from "@/stores/useWalletStore";
 import { getToken } from "@/utils/Cookies";
-import { Button, CenterPopup, Popup } from "antd-mobile";
+import { Button, Popup } from "antd-mobile";
 import { useTranslations } from "next-intl";
 import { FC, PropsWithChildren, ReactNode, useEffect, useRef, useState } from "react";
-import styles from "./style.module.scss";
-import { userInfoApi } from "@/api/login";
 import TipsModal, { ModalProps } from "../TipsModal";
+import styles from "./style.module.scss";
 export interface CardProps {
     item?: GameListRep;
     render?: (value: GameListRep) => ReactNode;
@@ -26,8 +26,8 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
     const brandRef = useRef<GameListRep | null>(null);
     const wallet = useWalletStore((state) => state.wallet);
     // 判断是否有未结算的对局
-    const gameModelRef = useRef<ModalProps>(null)
-    const gameRef = useRef<GameListRep & { mode: GameRequest["mode"] } | null>(null);
+    const gameModelRef = useRef<ModalProps>(null);
+    const gameRef = useRef<(GameListRep & { mode: GameRequest["mode"] }) | null>(null);
 
     const [visible, setVisible] = useState(false);
     const element = useRef<HTMLElement | null>(null);
@@ -66,34 +66,34 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
         const play_list = data?.play_list.map((item: any) => {
             return {
                 ...item,
-                mode: 1
-            }
-        })
+                mode: 1,
+            };
+        });
         const free_game_list = data?.free_game_list.map((item: any) => {
             return {
                 ...item,
-                mode: 2
-            }
-        })
+                mode: 2,
+            };
+        });
         const lose_game_list = data?.lose_game_list.map((item: any) => {
             return {
                 ...item,
-                mode: 3
-            }
-        })
-        let gameList = [...free_game_list, ...lose_game_list]
+                mode: 3,
+            };
+        });
+        let gameList = [...free_game_list, ...lose_game_list];
         if (groupType === 2) {
-            gameList = [...play_list, ...lose_game_list]
+            gameList = [...play_list, ...lose_game_list];
         }
         if (groupType === 3) {
-            gameList = [...play_list, ...free_game_list]
+            gameList = [...play_list, ...free_game_list];
         }
-        let unfinishedGame = gameList.find((item: { id: number }) => item?.id === game.id)
+        let unfinishedGame = gameList.find((item: { id: number }) => item?.id === game.id);
         if (unfinishedGame) {
-            gameRef.current = unfinishedGame
+            gameRef.current = unfinishedGame;
             setVisible(false);
-            gameModelRef.current?.onOpen()
-            return
+            gameModelRef.current?.onOpen();
+            return;
         }
         getGameUrl(brandRef.current!, params);
     };
@@ -101,9 +101,9 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
     const goGame = () => {
         getGameUrl(gameRef.current!, {
             id: gameRef.current?.id + "",
-            mode: gameRef.current?.mode!
+            mode: gameRef.current?.mode!,
         });
-    }
+    };
     return (
         <>
             {render ? (
@@ -134,17 +134,18 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
                     <div className={styles.cardWrap} style={{ width: "1.1rem" }}>
                         <img
                             src={item?.game_icon}
-                            alt={item?.game_name_cn + '-' + item?.category_name}
+                            alt={item?.game_name + "-" + item?.category_name}
                             className={"h-[100%] w-[100%]"}
                         />
                     </div>
                     <div className={styles.cardWrapGmeInfo}>
-                        <p className={"h-[0.6rem]"}>{item?.game_name_cn}</p>
+                        <p className={"h-[0.6rem]"}>{item?.game_name}</p>
 
                         <div className={"flex w-[2.2rem] justify-around"}>
                             {/* 只是PG游戏展示demo试玩按钮 */}
-                            {
-                                (item?.category_name === 'Pragmaticplay' || item?.category_name === 'PP') && <Button
+                            {(item?.category_name === "Pragmaticplay" ||
+                                item?.category_name === "PP") && (
+                                <Button
                                     onClick={() => playGameHandler({ ...item!, demo: 1 })}
                                     className={
                                         "h-[0.39rem] w-[0.89rem] rounded-[0.05rem] text-[0.15rem]" +
@@ -154,7 +155,7 @@ const Card: FC<PropsWithChildren<CardProps>> = (props) => {
                                 >
                                     {t("demo")}
                                 </Button>
-                            }
+                            )}
                             <Button
                                 onClick={() => playGameHandler(item!)}
                                 style={{

+ 3 - 4
src/components/ModalPopup/RedPacketModal/index.tsx

@@ -49,10 +49,9 @@ const HbyInfoDetail = (props: any) => {
         onCloseHby();
     };
     return (
-        <div
-            className={`absolute left-1/2 top-[50%] w-[90%] -translate-x-1/2 -translate-y-1/2 ${styles.promoRules}`}
-        >
+        <div className={`absolute left-1/2 top-[50%] w-[90%] -translate-x-1/2 -translate-y-1/2`}>
             <div onClick={onCloseHby} className={styles.closeIcon}></div>
+
             <img src={iconImg} onClick={handler} alt={"detail"} width={672} height={1044} />
         </div>
     );
@@ -287,7 +286,7 @@ const Snowfall: FC<SnowfallProps> = ({ images, snowflakeCount = 300, onClose = (
                 }
 
                 ctx.save();
-                ctx.globalAlpha = 1;
+                ctx.globalAlpha = 0.8;
                 ctx.translate(flake.x + (77 * flake.scale) / 2, flake.y + (44 * flake.scale) / 2);
                 ctx.rotate((flake.rotate * Math.PI) / 180);
                 ctx.drawImage(

+ 1 - 1
src/hooks/useGame.tsx

@@ -22,7 +22,7 @@ const useGame = () => {
             .then((res) => {
                 Toast.clear();
                 if (res.data && res.data.game_url) {
-                    const url = `${encodeURI(res.data.game_url)}&brand=${brand}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.category_name}`;
+                    const url = `${encodeURI(res.data.game_url)}&brand=${brand}&return_url=${window.location.href.replace(pathname, "")}&category_name=${game.provider}`;
                     const protocol = new URL(url).protocol;
                     if (
                         whiteUrls.indexOf(window.location.hostname) !== -1 ||

+ 31 - 3
src/styles/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4617618 */
-  src: url('iconfont.woff2?t=1736823626295') format('woff2'),
-       url('iconfont.woff?t=1736823626295') format('woff'),
-       url('iconfont.ttf?t=1736823626295') format('truetype');
+  src: url('iconfont.woff2?t=1737365512824') format('woff2'),
+       url('iconfont.woff?t=1737365512824') format('woff'),
+       url('iconfont.ttf?t=1737365512824') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,34 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-tuichu:before {
+  content: "\e640";
+}
+
+.icon-tuichu1:before {
+  content: "\e641";
+}
+
+.icon-dakaixinxi:before {
+  content: "\e620";
+}
+
+.icon-meiyuan8:before {
+  content: "\e73a";
+}
+
+.icon-jiaoyi:before {
+  content: "\e62f";
+}
+
+.icon-xiaoxi3-copy:before {
+  content: "\e630";
+}
+
+.icon-meiyuan:before {
+  content: "\e65e";
+}
+
 .icon-android:before {
   content: "\e677";
 }

BIN
src/styles/iconfont/iconfont.ttf


BIN
src/styles/iconfont/iconfont.woff


BIN
src/styles/iconfont/iconfont.woff2