Explorar el Código

Merge branch 'v1.4' of http://161.248.87.190:3000/bcwin/site_front into v1.4

year hace 2 meses
padre
commit
0fc816a5fe

+ 2 - 0
next.config.mjs

@@ -38,6 +38,8 @@ const nextConfig = {
             "next-themes",
             "react",
             "react-dom",
+            "swiper",
+            "zustand",
         ],
     },
     images: {

+ 2 - 0
src/api/home.ts

@@ -29,6 +29,8 @@ export interface GroupType {
     bet_type: 1 | 2 | 3;
 
     image: string;
+
+    isAnimation?: boolean;
 }
 
 /**

+ 0 - 1
src/app/[locale]/(TabBar)/[[...share]]/@actionWidget/Service.tsx

@@ -46,7 +46,6 @@ const SlotSection: FC<SlotSectionProps> = ({ onDestory }) => {
     const { data: slots, run: slotRun } = useRequest<any, any>(getSlots, {
         pollingInterval: 2000,
         pollingErrorRetryCount: 1,
-        pollingWhenHidden: false,
     });
     const slotHandler = () => {
         slotsRef.current?.onOpen(slots);

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

@@ -19,6 +19,7 @@ const buttonGroup = [
         url: "/freeGames",
         locale: true,
         lock: false,
+        isAnimation: true,
         image: "/home/free.png",
     },
     {
@@ -113,7 +114,15 @@ const TabItem = ({
         <div className={rootCls} onClick={() => handler(item)}>
             <div className="flex h-[.55rem] items-end justify-center">
                 {!item.image && <span className={cls}></span>}
-                {item.image && <img src={item.image} width={45} height={55} alt={item.url}></img>}
+                {item.image && (
+                    <img
+                        src={item.image}
+                        width={45}
+                        height={55}
+                        alt={item.url}
+                        className={clsx(item.isAnimation ? "animate-slow-bounce" : "")}
+                    ></img>
+                )}
             </div>
 
             <span className={"break-word truncate whitespace-normal text-center text-[0.13rem]"}>

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

@@ -52,7 +52,6 @@ const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
     }));
     const { data: cashback } = useRequest<any, any>(getCashBackApi, {
         pollingErrorRetryCount: 1,
-        pollingWhenHidden: false,
     });
 
     const max = cashback?.rules.reduce(

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

@@ -25,7 +25,6 @@ const getVipApi = async () => {
 const Profile = () => {
     const { data: userInfo } = useRequest<any, any>(userInfoApi, {
         pollingErrorRetryCount: 1,
-        pollingWhenHidden: false,
     });
     const { data: userMoney } = useRequest<any, any>(getUserMoneyApi, {
         pollingErrorRetryCount: 1,
@@ -33,7 +32,6 @@ const Profile = () => {
     });
     const { data: userVip } = useRequest<any, any>(getVipApi, {
         pollingErrorRetryCount: 1,
-        pollingWhenHidden: false,
     });
 
     return (

+ 0 - 1
src/app/[locale]/(doings)/cashWheel/CashWheelClient.tsx

@@ -645,7 +645,6 @@ const Wheel: FC<Props> = (props) => {
     const { run, cancel } = useRequest<any, any>(setWheel, {
         // pollingInterval: 5000,
         pollingErrorRetryCount: 1,
-        pollingWhenHidden: false,
     });
     return (
         <>

+ 7 - 1
src/app/[locale]/affiliate/summary/page.scss

@@ -153,8 +153,14 @@
     border-radius: .03rem;
     text-align: center;
     margin-top: .08rem;
-  cursor: pointer;
+    cursor: pointer;
 }
+
+  .btn-disable {
+    background: #e8e8e8;
+    border: .01rem solid #e8e8e8;
+    cursor: default;
+  }
 .summary .content .wallet .tip {
     font-size: .11rem;
     color: #383838;

+ 8 - 3
src/app/[locale]/affiliate/summary/page.tsx

@@ -16,6 +16,7 @@ import { getToken } from "@/utils/Cookies";
 import { copyText, flatPoint } from "@/utils/methods";
 import { useRequest } from "ahooks";
 import { Mask, Toast } from "antd-mobile";
+import clsx from "clsx";
 import { useTranslations } from "next-intl";
 import Image from "next/image";
 import { FC, useEffect, useRef, useState } from "react";
@@ -234,7 +235,6 @@ const App: FC<Props> = (props) => {
 
     const { data: todayData } = useRequest(getUserMoneyHandler, {
         pollingInterval: TIME,
-        pollingWhenHidden: true,
         pollingErrorRetryCount: 3,
         staleTime: 5000,
         refreshDeps: [token],
@@ -279,7 +279,6 @@ const App: FC<Props> = (props) => {
 
     const { data: commissionData, run: commissionRun } = useRequest(getCommission, {
         pollingInterval: TIME,
-        pollingWhenHidden: true,
         pollingErrorRetryCount: 3,
         staleTime: 5000,
     });
@@ -477,7 +476,13 @@ const App: FC<Props> = (props) => {
                                 </li>
                             </ul>
                             <div className="wallet">
-                                <div className="btn" onClick={withdrawalHandler}>
+                                <div
+                                    className={clsx(
+                                        "btn",
+                                        !commissionData?.enable_receive ? "btn-disable" : ""
+                                    )}
+                                    onClick={withdrawalHandler}
+                                >
                                     {t("TRANSFERIR")}
                                 </div>
                                 <div className="tip">

+ 0 - 1
src/app/[locale]/providers.tsx

@@ -97,7 +97,6 @@ const StopServiceClient = () => {
     const { data: isSuspension } = useRequest(getStopServiceApi, {
         pollingInterval: 10000,
         pollingErrorRetryCount: 3,
-        pollingWhenHidden: false,
     });
 
     return (

+ 1 - 0
src/app/globals.scss

@@ -94,6 +94,7 @@ body {
 .main-header {
     height: calc(100% - $-header-height);
     overflow-y: scroll;
+  overflow-x: hidden;
 }
 
 input {

+ 0 - 2
src/components/Footer/index.tsx

@@ -84,7 +84,6 @@ const Footer: FC = () => {
         pollingInterval: 10000,
         manual: true,
         pollingErrorRetryCount: 3,
-        pollingWhenHidden: false,
         onSuccess: (data) => {
             setNotices(data?.data || [], data?.summery.unread || 0);
             setPromotionCount(data.summery.promotion_count || 0);
@@ -103,7 +102,6 @@ const Footer: FC = () => {
 
     const { run: walletRun } = useRequest(getUserMoneyApi, {
         pollingInterval: 5000,
-        pollingWhenHidden: true,
         pollingErrorRetryCount: 3,
         staleTime: 5000,
         manual: true,

+ 3 - 2
src/components/HeaderBack/index.tsx

@@ -1,6 +1,7 @@
 "use client";
 import { usePathname, useRouter } from "@/i18n/routing";
 import { useWalletStore } from "@/stores/useWalletStore";
+import { getToken } from "@/utils/Cookies";
 import clsx from "clsx";
 import { useTranslations } from "next-intl";
 import { FC, PropsWithChildren, ReactNode, useEffect, useState } from "react";
@@ -84,13 +85,13 @@ const HeaderBack: FC<PropsWithChildren<HeaderBackProps>> = ({
                 {(title || selfTitle) && <span>{title || selfTitle}</span>}
             </div>
             <div className={styles.content}>{children}</div>
-            {/* {getToken() && (
+            {getToken() && (
                 <div>
                     {!wallet.is_open_no_bonus && (
                         <img src="/img/no_bouns.png" alt="" className="h-[20px]" />
                     )}
                 </div>
-            )} */}
+            )}
 
             {!Right && (
                 <span className={styles.right} onClick={() => goPage("home")}>

+ 0 - 1
src/components/ModalPopup/ActivityModal/index.tsx

@@ -17,7 +17,6 @@ const ActivityMask = () => {
 
     const { run, cancel } = useRequest(getUserMoneyApi, {
         pollingInterval: 5000,
-        pollingWhenHidden: true,
         pollingErrorRetryCount: 3,
         staleTime: 5000,
         onError: (error) => {},

+ 3 - 3
src/components/ModalPopup/WalletDescribeModal/index.tsx

@@ -1,6 +1,6 @@
 import { Wallet, cleanBounsApi, toggleUserBounsApi } from "@/api/user";
 import { percentage } from "@/utils/methods";
-import { Dialog, ProgressBar, Toast } from "antd-mobile";
+import { Dialog, ProgressBar, Switch, Toast } from "antd-mobile";
 import { useTranslations } from "next-intl";
 import React from "react";
 import "./style.scss";
@@ -134,7 +134,7 @@ export const BonusContent = (props: { wallet: Wallet; handleAcquire?: any }) =>
                 <li className="mt-[.06rem]">{t("bonusDesc2")}</li>
                 <li className="mt-[.06rem]">{t("bonusDesc3")}</li>
             </ul>
-            {/* <div className="mt-[.15rem] rounded-[8px] border-[1px] border-[#e540ff] bg-[#2f4cc8] shadow-[0_-10px_25px_#e641ff_inset]">
+            <div className="mt-[.15rem] rounded-[8px] border-[1px] border-[#e540ff] bg-[#2f4cc8] shadow-[0_-10px_25px_#e641ff_inset]">
                 <div className="flex flex-row items-center justify-between border-b-[1px] border-[#e540ff] p-[8px]">
                     <span className="text-[#fff]">{t("bounsTitle1")}</span>
                     <Switch
@@ -165,7 +165,7 @@ export const BonusContent = (props: { wallet: Wallet; handleAcquire?: any }) =>
                         {t("boundsBtn")}
                     </a>
                 </div>
-            </div> */}
+            </div>
             {handleAcquire && (
                 <a
                     className={`carteira-box ${wallet.is_point_transfer ? "active" : ""}`}

+ 1 - 0
src/hooks/useGame.tsx

@@ -80,6 +80,7 @@ const useGame = () => {
             })
             .catch((error) => {
                 Toast.clear();
+                Toast.show(t(`code.${error.data?.code || 500}`));
             });
     };
     return {

+ 19 - 1
tailwind.config.ts

@@ -4,7 +4,6 @@ const MAX_WIDTH = 1440;
 const toRem = (px: number) => {
     return `${((4 * px) / (MAX_WIDTH / 10)).toFixed(2)}rem`;
 };
-
 const keyframes = {
     "slow-bounce": {
         "0%,100%": {
@@ -17,6 +16,24 @@ const keyframes = {
             animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)",
         },
     },
+
+    shake: {
+        "10%,90% ": {
+            transform: "translate3d(-1px, 0, 0) rotate(-1deg)",
+        },
+        "20%,80%": {
+            transform: "translate3d(2px, 0, 0) rotate(1deg)",
+        },
+        "30%,70%": {
+            transform: "translate3d(-3px, 0, 0) rotate(-3deg)",
+        },
+        "40%,60%": {
+            transform: "translate3d(3px, 0, 0) rotate(1deg)",
+        },
+        "50%": {
+            transform: "translate3d(-3px, 0, 0) rotate(3deg)",
+        },
+    },
 };
 const size: any = Array.from({ length: 100 }).reduce((map: any, _, index) => {
     map[index] = toRem(index);
@@ -51,6 +68,7 @@ const config: Config = {
 
             animation: {
                 "slow-bounce": "slow-bounce   1s linear infinite",
+                "slow-shake": "shake 0.8s ease-in-out infinite",
             },
         },
         colors: {