Browse Source

feat: 修改BUG和功能开发

year 1 month ago
parent
commit
10d77e73fc

BIN
public/home/10.png


BIN
public/home/10.webp


BIN
public/home/box.png


BIN
public_original/home/10.png


BIN
public_original/home/box.png


+ 2 - 1
src/api/home.ts

@@ -163,6 +163,7 @@ export interface GameListRep {
 
     action_params?: any;
     action_type?: ActionType;
+    additional?: any;
 }
 
 /**
@@ -259,7 +260,7 @@ export interface BannerRep {
     is_badge?: boolean;
 
     badge_url?: string;
-    badge: string;
+    badge_text: string;
 }
 
 export interface Content {

+ 4 - 2
src/app/[locale]/(TabBar)/[[...share]]/_home/HomePrize.tsx

@@ -17,6 +17,8 @@ const HomePrize: FC<Props> = (props) => {
     const t = useTranslations("HomePage");
     const tt = useTranslations("Game");
 
+    console.log(data);
+
     return (
         <div className={"my-[0.0694rem] px-[.1rem] pb-[.2rem] pt-[.15rem]"}>
             {/* <div className={"mb-[0.0347rem]"}>{t("prize")}</div> */}
@@ -65,7 +67,7 @@ const HomePrize: FC<Props> = (props) => {
                     <div className={styles.item}>
                         <div>Jogos</div>
                         <div>Jogador</div>
-                        <div>Aposta</div>
+                        {/* <div>Aposta</div> */}
                         <div>Pagamento</div>
                     </div>
                     <Swiper
@@ -91,7 +93,7 @@ const HomePrize: FC<Props> = (props) => {
                                         <span>{prize.game_name}</span>
                                     </div>
                                     <div>{prize.phone}</div>
-                                    <div>Aposta</div>
+                                    {/* <div>Aposta</div> */}
                                     <div>R${prize.amount}</div>
                                 </div>
                             </SwiperSlide>

+ 8 - 1
src/app/[locale]/(TabBar)/[[...share]]/_home/NavigateBar.tsx

@@ -10,9 +10,16 @@ interface Props {
 }
 
 const NavigateBar: React.FC<Props> = ({ data }) => {
+    const slidesPerView = React.useMemo(() => {
+        if (data.length > 5) {
+            return 4.5;
+        }
+        return 5;
+    }, [data]);
+
     return (
         <div className="pt-[.1rem]">
-            <Swiper spaceBetween={15} slidesPerView={4.5}>
+            <Swiper spaceBetween={15} slidesPerView={slidesPerView}>
                 {data.map((item) => {
                     return (
                         <SwiperSlide key={item.id}>

+ 10 - 5
src/app/[locale]/(TabBar)/[[...share]]/_home/prize.module.scss

@@ -48,11 +48,12 @@
         align-items: center;
         justify-content: center;
         height: 100%;
-        color: #5d7284;
+        color: #fff;
         font-weight: 700;
+        font-size: 0.15rem;
     }
     :global(.adm-tabs-tab-active) {
-        color: #122f23;
+        color: #121b1b;
     }
     .desc {
         font-size: 0.1rem;
@@ -80,19 +81,23 @@
     height: 50px;
     div {
         flex: 1;
-        font-size: 0.1rem;
+        font-size: 0.11rem;
+        color: #a5a8b6;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
         &:nth-child(3) {
             flex: 0 0 0.6rem;
             text-align: center;
         }
-        &:nth-child(4) {
+        &:nth-child(3) {
             flex: 0 0 0.6rem;
             text-align: center;
         }
     }
     &.normal {
         div {
-            &:nth-child(4) {
+            &:nth-child(3) {
                 color: #11de68;
             }
         }

+ 9 - 5
src/app/[locale]/(TabBar)/deposit/component/deposit/index.tsx

@@ -402,9 +402,13 @@ const Deposit = () => {
                     levantar o dinheiro, caso contrário o levantamento não será bem-sucedido.
                 </div>
             </div>
-            <TipsModal getContainer={document.body} title={"Tips"} ref={tipModelRef}>
+            <TipsModal
+                getContainer={document.querySelector("#app")}
+                title={<div className="text-[#ffff]">Tips</div>}
+                ref={tipModelRef}
+            >
                 <div className={"flex items-center justify-between"}>
-                    <h2 className={"text-[0.14rem]"}>Mantenha Bônus</h2>
+                    <h2 className={"text-[0.14rem] text-[#fff]"}>Mantenha Bônus</h2>
                     <Button
                         color={"primary"}
                         className={"mx-auto"}
@@ -417,7 +421,7 @@ const Deposit = () => {
                         Depósito
                     </Button>
                 </div>
-                <p className={"mt-[0.05rem] text-left text-[0.12rem] font-medium text-[#666]"}>
+                <p className={"mt-[0.05rem] text-left text-[0.12rem] font-medium text-[#11de68]"}>
                     Recarga direta, mantendo a carteira principal e informações de carteira de
                     bônus;
                 </p>
@@ -431,7 +435,7 @@ const Deposit = () => {
                     }}
                 ></b>
                 <div className={"flex items-center justify-between"}>
-                    <h2 className={"text-[0.14rem]"}>Esvaziem Bônus</h2>
+                    <h2 className={"text-[0.14rem] text-[#fff]"}>Esvaziem Bônus</h2>
                     <Button
                         color={"primary"}
                         className={"mx-auto"}
@@ -444,7 +448,7 @@ const Deposit = () => {
                         Depósito
                     </Button>
                 </div>
-                <p className={"mt-[0.05rem] text-left text-[0.12rem] font-medium text-[#64d23e]"}>
+                <p className={"mt-[0.05rem] text-left text-[0.12rem] font-medium text-[#11de68]"}>
                     Após a recarga, o saldo principal é mantido e todo o bônus é esvaziado, a nova
                     carteira principal e a carteira de bônus são re-gravadas a quantidade de códigos
                     jogados;

+ 4 - 4
src/app/[locale]/(TabBar)/deposit/component/withdraw/index.tsx

@@ -491,7 +491,7 @@ const Withdraw = () => {
                     </div>
                 }
                 ref={canWithdrawRef}
-                getContainer={document.body}
+                getContainer={document.querySelector("#app")}
                 className={styles.ModalBox}
             >
                 <ul>
@@ -535,7 +535,7 @@ const Withdraw = () => {
                     </div>
                 }
                 ref={scoreRef}
-                getContainer={document.body}
+                getContainer={document.querySelector("#app")}
                 className={styles.ModalBox}
             >
                 <ul>
@@ -634,7 +634,7 @@ const Withdraw = () => {
                     </div>
                 }
                 ref={gameModelRef}
-                getContainer={document.body}
+                getContainer={document.querySelector("#app")}
                 className={styles.gameModal}
             >
                 <div className="pt-[.2rem]">
@@ -682,7 +682,7 @@ const Withdraw = () => {
                 }
                 visible={true}
                 ref={successModelRef}
-                getContainer={document.body}
+                getContainer={document.querySelector("#app")}
                 className={styles.gameModal}
             >
                 <div className="pt-[.2rem]">

+ 1 - 1
src/app/[locale]/(TabBar)/profile/ProfileHeader.tsx

@@ -449,7 +449,7 @@ export const ProfileHeader = () => {
     };
 
     const doCopyUsreId = () => {
-        copyText(userInfo?.data?.id || "");
+        copyText(`${userInfo.data.user_phone}`);
         Toast.show({ icon: "success", content: tc("SummaryPage.copySuc"), maskClickable: false });
     };
 

+ 2 - 2
src/app/[locale]/(TabBar)/promo/page.tsx

@@ -155,9 +155,9 @@ const Promo = () => {
                                                 alt=""
                                             />
                                         )}
-                                        {item.badge && (
+                                        {item.badge_text && (
                                             <span className="mr-[.1rem] text-[.13rem]">
-                                                {item.badge}
+                                                {item.badge_text}
                                             </span>
                                         )}
                                         {item.is_badge && (

+ 5 - 3
src/app/[locale]/(navbar)/vip/top.tsx

@@ -57,9 +57,11 @@ const Top: React.FC<Props> = ({ data, cashbackInfo }) => {
                     ></VipIcon>
                 </div>
                 <div className={clsx(styles.intro, "mt-[.3rem] text-[.12rem]")}>
-                    <div>Faça qualquer depósito para desbloquear o privilégio VIP!</div>
                     <div>
-                        Faça mais apostas para atualizar seu nivel VlP e aproveitar mais b&apos;nus!
+                        Faça mais apostas para atualizar seu nivel VIP e aproveitar mais Bônus!
+                    </div>
+                    <div>
+                        Os tipos de crash e jogos virtuais não ganham experiência de upgrade VIP.
                     </div>
                     <div>Aposta de R$1,00=1XP</div>
                     <div className="mt-[.2rem] text-center">
@@ -83,7 +85,7 @@ const Top: React.FC<Props> = ({ data, cashbackInfo }) => {
                     </div>
                 }
                 className={clsx(styles.descBox)}
-                getContainer={document.body}
+                getContainer={document.querySelector("#app")}
                 ref={descRef}
             >
                 {cashbackInfo && <CashbackTable cashbackInfo={cashbackInfo}></CashbackTable>}

+ 5 - 2
src/components/Box/index.tsx

@@ -27,6 +27,7 @@ interface Props {
     onBeforeHandler?: () => void;
     additional?: {
         [key: number]: (adata: any) => void;
+        default?: (adata: any) => void;
     };
 }
 
@@ -139,7 +140,7 @@ const Box: FC<PropsWithChildren<Props>> = (props) => {
     );
 
     const handler = async () => {
-        if (!action) return;
+        if (action === undefined) return;
         if (onBeforeHandler) {
             onBeforeHandler();
         }
@@ -169,7 +170,9 @@ const Box: FC<PropsWithChildren<Props>> = (props) => {
                 }
                 break;
             default:
-                console.log(`🎯🎯🎯🎯🎯-> in index.tsx on 71`);
+                if (additional && additional?.default) {
+                    additional.default(actionData);
+                }
                 break;
         }
     };

+ 1 - 0
src/components/Card/GroupCard.tsx

@@ -29,6 +29,7 @@ const GroupCard: FC<GroupProps> = (props) => {
                             pb={false}
                             actionData={item?.action_params}
                             action={item?.action_type}
+                            additional={item?.additional}
                             className="h-[1.54rem] overflow-hidden rounded-[0.1rem]"
                         >
                             <img src="/home/placehold.webp" className="h-[100%]" alt="" />

+ 8 - 3
src/components/Card/SwiperGroup.tsx

@@ -91,9 +91,11 @@ const HomeSwiper: FC<PropsWithChildren<SwiperGroupProps>> = (props) => {
                         release_date: "",
                         action_type: group.action_type,
                         action_params: group.action_params,
-                        // toDo: () => {
-                        //     todoHandler && todoHandler(group);
-                        // },
+                        additional: {
+                            default: (adata: any) => {
+                                todoHandler && todoHandler(group);
+                            },
+                        },
                     },
                 ],
             });
@@ -142,6 +144,9 @@ const HomeSwiper: FC<PropsWithChildren<SwiperGroupProps>> = (props) => {
                                     pb={false}
                                     actionData={group.action_params}
                                     action={group.action_type}
+                                    additional={{
+                                        default: () => todoHandler && todoHandler(group),
+                                    }}
                                 >
                                     {/* Todos */}
                                     <div className="cursor-pointer bg-[#2b353f] px-[.02rem] py-[.02rem] text-[#788f97]">

+ 16 - 5
src/components/Footer/index.tsx

@@ -25,27 +25,32 @@ export interface FooterProps {
 const whitRouter = ["/deposit", "/profile"];
 const tabList = [
     {
-        iconSpanName: "icon-ic-shouye",
+        iconSpanName: "icon-shouye3",
+        iconActSpanName: "icon-ic-shouye",
         label: "start",
         path: "/",
     },
     {
         iconSpanName: "icon-qianbao11",
+        iconActSpanName: "icon-chongzhi",
         label: "deposit",
         path: "/deposit",
     },
     {
         iconSpanName: "icon-afiliado",
+        iconActSpanName: "icon-afiliado",
         label: "affiliated",
         path: "/affiliate",
     },
     {
         iconSpanName: "icon-liwu",
+        iconActSpanName: "icon-huodong",
         label: "promocoes",
         path: "/promo",
     },
     {
         iconSpanName: "icon-gerenzhongxin",
+        iconActSpanName: "icon-gerenzhongxin1",
         label: "profile",
         path: "/profile",
     },
@@ -146,24 +151,26 @@ const Footer: FC = () => {
             <div className="footer-box">
                 <div className={"footer-item"}>
                     {tabList.map((item, index) => {
+                        const isAct = item.path === pathname;
                         return (
                             <Link
                                 href={item.path}
                                 onClick={(event) => goPage(event, item.path)}
                                 key={index}
                                 prefetch
-                                className={`footer-item-column ${item.path === pathname ? "active" : ""}`}
+                                className={`footer-item-column ${isAct ? "active" : ""}`}
                             >
                                 <div className="icon-box">
                                     {index == 2 ? (
-                                        <div className="relative -top-[.12rem] flex h-[.64rem] w-[.64rem] items-center justify-center overflow-hidden">
+                                        <div className="relative -top-[.12rem] flex w-[100%] items-center justify-center">
                                             {/* <Image src="/home/game.png" width={84} height={84} alt='middle'></Image> */}
                                             <img
                                                 src={"/home/box.png"}
                                                 style={{
-                                                    width: ".8rem",
+                                                    width: "100%",
                                                     maxWidth: "1000%",
                                                     position: "relative",
+                                                    transform: "scale(1.4)",
                                                 }}
                                                 alt=""
                                             />
@@ -182,7 +189,11 @@ const Footer: FC = () => {
                                             }}
                                         >
                                             <span
-                                                className={clsx("iconfont", item.iconSpanName)}
+                                                className={clsx(
+                                                    "iconfont",
+                                                    isAct ? "text-[.25rem]" : "text-[.23rem]",
+                                                    isAct ? item.iconActSpanName : item.iconSpanName
+                                                )}
                                             ></span>
                                         </Badge>
                                     )}

+ 6 - 3
src/components/Footer/style.scss

@@ -30,10 +30,11 @@
     .footer-item {
         width: 100%;
         height: 100%;
-        padding-bottom: 0.02rem;
+        // padding-bottom: 0.02rem;
         display: flex;
         flex-direction: row;
         align-items: flex-end;
+        padding-bottom: 0.06rem;
 
         .footer-item-column {
             position: relative;
@@ -65,9 +66,11 @@
                 display: flex;
                 align-items: center;
                 justify-content: center;
-
+                .adm-badge-wrapper {
+                    line-height: 1;
+                }
                 span {
-                    font-size: 0.2rem;
+                    font-size: 0.26rem;
                     color: #505d62;
                 }
 

+ 61 - 38
src/components/Layout/Sidebar.tsx

@@ -214,24 +214,25 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
 
     const walletCfg = useMemo(() => {
         const result: any = [
-            {
-                text: "Saldo",
-                icon: "/sidebar/saldo.webp",
-                textStyle: { fontSize: ".12rem" },
-                value: wallet.score || 0,
-            },
-            {
-                text: "Bônus",
-                icon: "/sidebar/bonus.webp",
-                textStyle: { fontSize: ".12rem" },
-                value: wallet.point || 0,
-            },
+            // {
+            //     text: "Saldo",
+            //     icon: "/sidebar/saldo.webp",
+            //     textStyle: { fontSize: ".12rem" },
+            //     value: wallet.score || 0,
+            // },
+            // {
+            //     text: "Bônus",
+            //     icon: "/sidebar/bonus.webp",
+            //     textStyle: { fontSize: ".12rem" },
+            //     value: wallet.point || 0,
+            // },
         ];
         if (show_free_game === 1) {
             result.push({
                 text: "Carteira grátis",
                 icon: "/sidebar/free.webp",
                 value: wallet.free_score || 0,
+                url: "/freeGames",
             });
         }
         if (show_again_game === 1) {
@@ -240,6 +241,7 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
                 icon: "/sidebar/money.webp",
                 textStyle: { fontSize: ".09rem" },
                 value: wallet.lose_score || 0,
+                url: "/replayGames",
             });
         }
         return result;
@@ -330,33 +332,50 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
                             {/* <img src="/home/placehold.webp" alt="" /> */}
                         </div>
                     </div>
-                    <div className={clsx(styles.sideTitle, "mt-[.06rem]")}>
-                        <i
-                            className={clsx("iconfont icon-qianbao11 text-[.26rem]", styles.icon)}
-                        ></i>
-                        <span>Carteira</span>
-                    </div>
-
-                    <div className={styles.qianbao}>
-                        {walletCfg.map((item: any) => {
-                            return (
-                                <div key={item.text} className={styles.qianbaoItem}>
-                                    <img className="mr-[.06rem] w-[.3rem]" src={item.icon} alt="" />
-                                    <div>
-                                        <div className="text-[.16rem] leading-[1.2]">
-                                            {item.value}R
-                                        </div>
-                                        <div
-                                            className="text-[.1rem] leading-[1]"
-                                            style={{ ...(item.textStyle || {}) }}
+                    {walletCfg?.length && (
+                        <>
+                            <div className={clsx(styles.sideTitle, "mt-[.06rem]")}>
+                                <i
+                                    className={clsx(
+                                        "iconfont icon-qianbao11 text-[.26rem]",
+                                        styles.icon
+                                    )}
+                                ></i>
+                                <span>Carteira</span>
+                            </div>
+                            <div className={styles.qianbao}>
+                                {walletCfg.map((item: any) => {
+                                    return (
+                                        <Link
+                                            href={item.url}
+                                            key={item.text}
+                                            prefetch
+                                            onClick={() => setCollapse(false)}
+                                            className={styles.qianbaoItem}
                                         >
-                                            {item.text}
-                                        </div>
-                                    </div>
-                                </div>
-                            );
-                        })}
-                    </div>
+                                            <img
+                                                className="mr-[.06rem] w-[.3rem]"
+                                                src={item.icon}
+                                                alt=""
+                                            />
+                                            <div>
+                                                <div className="text-[.16rem] leading-[1.2]">
+                                                    {item.value}R
+                                                </div>
+                                                <div
+                                                    className="text-[.1rem] leading-[1]"
+                                                    style={{ ...(item.textStyle || {}) }}
+                                                >
+                                                    {item.text}
+                                                </div>
+                                            </div>
+                                        </Link>
+                                    );
+                                })}
+                            </div>
+                        </>
+                    )}
+
                     {cardData.length > 0 && (
                         <div className={clsx(styles.sideTitle, "my-[.06rem]")}>
                             <i
@@ -375,6 +394,10 @@ const Sidebar: FC<PropsWithChildren<Props>> = (props) => {
                                     actionData={item.action_params}
                                     className={styles.promoItem}
                                     onBeforeHandler={() => registePromo(item.id)}
+                                    pb={false}
+                                    pt={false}
+                                    pl={false}
+                                    pr={false}
                                 >
                                     <div
                                         key={item.id}

+ 7 - 3
src/components/Layout/style.module.scss

@@ -7,7 +7,7 @@
 .providerBox {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
-    gap: 0.12rem;
+    gap: 5px;
 }
 .providerItem {
     aspect-ratio: 1/1;
@@ -41,7 +41,7 @@
 .qianbao {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
-    gap: 0.12rem;
+    gap: 5px;
     .qianbaoItem {
         cursor: pointer;
         display: flex;
@@ -51,6 +51,8 @@
         padding: 0.1rem 0 0.1rem 0.1rem;
         width: 100%;
         border-radius: 0.06rem;
+        min-height: 0.54rem;
+        color: #fff;
         img {
             width: 0.26rem;
         }
@@ -59,10 +61,12 @@
 .promotionBox {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
-    gap: 0.12rem;
+    gap: 5px;
     .promotionItem {
         width: 100%;
         cursor: pointer;
+        border-radius: 0.1rem;
+        overflow: hidden;
         img {
             width: 100%;
         }