Kaynağa Gözat

fix: 6677 6671 6631 6141

Before 7 ay önce
ebeveyn
işleme
b107bd2771

+ 21 - 0
messages/br.json

@@ -197,6 +197,7 @@
     "channel": "cannot be empty",
     "cpf": "CPF",
     "cpfReg": "The CPF is malformed",
+    "cnpjReg": "The CNPJ is malformed",
     "phoneReg": "The Phone is malformed",
     "EmailReg": "The Email is malformed",
     "amount": "The Montante cannot be empty",
@@ -380,6 +381,7 @@
     "1200":"Insufficient inventory",
     "1201": "",
     "1202":"",
+    "1203": "VIP rebate is now claimed",
     "1300": "",
     "1301":"",
     "1400": "",
@@ -396,6 +398,25 @@
     "1600": "Order creation failed",
     "1601": "The top-up channel does not exist"
   },
+  "bonusType": {
+    "7": "comissão",
+    "12": "adicionar",
+    "13": "reduzir",
+    "16": "activity",
+    "20": "Bônus to cash",
+    "21": "Free to cash",
+    "22": "Replay to cash"
+  },
+  "activityType": {
+    "1": "Primeira recarga",
+    "2": "Recarga de ofertas",
+    "3": "Chuva de dinheiro",
+    "4": "vip cashback",
+    "5": "Convidação de rouleta",
+    "6": "Register para jogo livre",
+    "7": "Compensação pela perda de dinheiro"
+  },
+
   "form": {
     "phone":"Phone Number",
     "phoneReg": "The phone number cannot be empty",

+ 21 - 0
messages/en.json

@@ -196,6 +196,7 @@
     "channel": "cannot be empty",
     "cpf": "CPF",
     "cpfReg": "The CPF is malformed",
+    "cnpjReg": "The CNPJ is malformed",
     "phoneReg": "The Phone is malformed",
     "EmailReg": "The Email is malformed",
     "amount": "The Montante cannot be empty",
@@ -379,6 +380,7 @@
     "1200":"Insufficient inventory",
     "1201": "",
     "1202":"",
+    "1203": "VIP rebate is now claimed",
     "1300": "",
     "1301":"",
     "1400": "",
@@ -395,6 +397,25 @@
     "1600": "Order creation failed",
     "1601": "The top-up channel does not exist"
   },
+  "bonusType": {
+    "7": "Commission withdrawals",
+    "12": "Upper points",
+    "13": "Score less",
+    "16": "activity",
+    "20": "Bonus coin withdrawals",
+    "21": "Free coin withdrawals",
+    "22": "Replay Coin withdrawal"
+  },
+  "activityType": {
+    "1": "Primeira recarga",
+    "2": "Recarga de ofertas",
+    "3": "Chuva de dinheiro",
+    "4": "vip cashback",
+    "5": "Convidação de rouleta",
+    "6": "Register para jogo livre",
+    "7": "Compensação pela perda de dinheiro"
+  },
+
   "form": {
     "phone":"Phone Number",
     "phoneReg": "The phone number cannot be empty",

+ 6 - 0
next.config.mjs

@@ -18,6 +18,12 @@ const nextConfig = {
             fullUrl: true,
         },
     },
+    experimental: {
+        staleTimes: {
+            dynamic: 0,
+            static: 180,
+        },
+    },
     images: {
         domains: ["9f.com", "images.hibigwin.com", "192.168.0.237"],
         remotePatterns: [

+ 8 - 0
src/api/user.ts

@@ -300,4 +300,12 @@ export interface DepositsRep {
      * 充值标题说明
      */
     title: string;
+    /**
+     * 类型
+     */
+    type: number;
+    /**
+     * 活动类型
+     */
+    sub_type: number;
 }

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

@@ -40,7 +40,6 @@ const Profile = async () => {
     const userInfo = await getUserInfo();
     const userMoney = await getMoneyApi();
     const userVip = await getVipApi();
-    console.log(`🚀🚀🚀🚀🚀-> in page.tsx on 40`, userVip);
     return (
         <div className="profile-box">
             <ProfileHeader userInfo={userInfo} userMoney={userMoney} userVip={userVip!} />

+ 11 - 2
src/app/[locale]/(navbar)/transactions/Bouns.tsx

@@ -4,6 +4,7 @@ import { Pagination } from "@/types";
 import { server } from "@/utils/client";
 import { useSetState } from "ahooks";
 import { InfiniteScroll } from "antd-mobile";
+import { useTranslations } from "next-intl";
 import { useRef } from "react";
 import Message from "./components/Message";
 
@@ -17,15 +18,23 @@ const getTransactionsApi = async (data: Params) => {
 };
 
 const Bouns = () => {
+    const t = useTranslations();
     const params = useRef({ current_page: 0, page_size: 20, use_page: true });
     const [sourceData, setSourceData] = useSetState<{
         list: DepositsRep[];
         page: Partial<Pagination>;
     }>({ list: [], page: { is_end: false } });
-
     const getDepositsData = async () => {
         return getTransactionsApi(params.current).then((res) => {
-            setSourceData((value) => ({ page: res.page, list: [...value.list, ...res.data] }));
+            const newData = res.data.map((item) => {
+                return {
+                    ...item,
+                    title: t(
+                        `${item.type === 16 ? "activityType" : "bonusType"}.${item.type === 16 ? item.sub_type : item.type}`
+                    ),
+                };
+            });
+            setSourceData((value) => ({ page: res.page, list: [...value.list, ...newData] }));
             return res;
         });
     };

+ 17 - 4
src/app/[locale]/(navbar)/withdraw/WithdrawWidget.tsx

@@ -9,7 +9,7 @@ import TipsModal, { ModalProps } from "@/components/TipsModal";
 import { useUserInfoStore } from "@/stores/useUserInfoStore";
 import { useWalletStore } from "@/stores/useWalletStore";
 import { isEmail } from "@/utils";
-import { percentage } from "@/utils/methods";
+import { flatPoint, percentage } from "@/utils/methods";
 import { ActionSheet, Form, Input, ProgressBar, Toast } from "antd-mobile";
 import type { Action } from "antd-mobile/es/components/action-sheet";
 import { FormInstance } from "antd-mobile/es/components/form";
@@ -59,6 +59,10 @@ const MobileField: FC<MobileFieldProps> = (props) => {
             setPlaceholder("000.000.000-00");
             return;
         }
+        if (item.type === ChannelEnum.CNPJ) {
+            setPlaceholder("00.000.000.0000-00");
+            return;
+        }
         if (item.type === ChannelEnum.Phone) {
             setPlaceholder("11 dígitos");
             return;
@@ -155,6 +159,11 @@ const WithdrawWidget: FC<Props> = (props) => {
                 ? Promise.reject(new Error(t("WithdrawPage.cpfReg")))
                 : Promise.resolve();
         }
+        if (value.type === ChannelEnum.CNPJ) {
+            return value.account_no.length !== 14
+                ? Promise.reject(new Error(t("WithdrawPage.cnpjReg")))
+                : Promise.resolve();
+        }
         if (value.type === ChannelEnum.Email) {
             return isEmail(value.account_no)
                 ? Promise.resolve()
@@ -162,7 +171,7 @@ const WithdrawWidget: FC<Props> = (props) => {
         }
 
         if (value.type === ChannelEnum.Phone) {
-            return value.account_no.length < 11
+            return value.account_no.length < 10
                 ? Promise.reject(new Error(t("WithdrawPage.phoneReg")))
                 : Promise.resolve();
         }
@@ -385,7 +394,9 @@ const WithdrawWidget: FC<Props> = (props) => {
                         <div>
                             <span>{t("WithdrawPage.pointBet")}</span>
                             <span>
-                                {wallet.target_score_rollover - wallet.current_score_rollover}
+                                {flatPoint(
+                                    wallet.target_score_rollover - wallet.current_score_rollover
+                                )}
                             </span>
                         </div>
                     </li>
@@ -433,7 +444,9 @@ const WithdrawWidget: FC<Props> = (props) => {
                         <div>
                             <span>{t("WithdrawPage.pointBet")}</span>
                             <span>
-                                {wallet.target_point_rollover - wallet.current_point_rollover}
+                                {flatPoint(
+                                    wallet.target_point_rollover - wallet.current_point_rollover
+                                )}
                             </span>
                         </div>
                     </li>

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

@@ -123,7 +123,6 @@ const Footer: FC = () => {
                     {tabList.map((item, index) => {
                         return (
                             <Link
-                                prefetch={null}
                                 href={item.path}
                                 onClick={(event) => goPage(event, item.path)}
                                 key={index}

+ 1 - 1
src/utils/methods/index.ts

@@ -106,7 +106,7 @@ export let copyText = function (text: string) {
 export const percentage = (current: number, source: number) => {
     if (!source) return 0;
     const num = (current * 100) / source;
-    return num > 100 ? 100 : num;
+    return num > 100 ? 100 : flatPoint(num);
 };
 
 /**