Ver código fonte

修改 withdraw

zhejiushizhuce 2 anos atrás
pai
commit
508b253fc9

+ 2 - 1
src/features/paySlice.js

@@ -206,7 +206,8 @@ const reducerWithdrawPayout=(state,action,arg)=>{
     let payload=action.payload;
     let msg=getHttpMsg(payload);
     if (payload&&payload.code===200){
-        toast.success(msg);
+        // toast.success(msg);
+        toast.success(i18n.t("withdraw.tip.success"));
     }
     else
     {

+ 14 - 0
src/locales/languages/en_US.json

@@ -339,6 +339,20 @@
       "processing": "Processing",
       "detail_title": "Record Details"
     },
+    "tip": {
+      "success": "The submission is successful and the system is under review",
+      "total_not_enough": "The withdrawable amount is not enough",
+      "under_can_score": "The single withdrawal quantity cannot be less than {0}",
+      "over_can_score": "The single withdrawal quantity cannot be higher than {0}",
+      "exceed_count_limit": "Only {0} withdrawal requests can be initiated per day",
+      "user_score_not_enough": "Your Chip is not enough",
+      "user_in_game": "Sorry, You're in game for now",
+      "need_recharge": "Your withdrawal request amount is too much, you must top up before you can continue to withdraw",
+      "btn_to_recharge": "To recharge",
+      "unbound_account": "You have not bound a bank account and cannot withdraw",
+      "account_abnormal": "The system has detected an abnormal operation in your account, and your withdrawal has been prohibited. Please contact customer service",
+      "score_null": "You didn't fill in the withdrawal amount"
+    },
     "help": {
       "title": "Withdrawal Rules",
       "rule_1": "1. The minimum/maximum amount which you can withdraw every time is {0}/ {1};",

+ 14 - 0
src/locales/languages/es_MX.json

@@ -333,6 +333,20 @@
       "processing": "Procesando",
       "detail_title": "Detalles del Registro"
     },
+    "tip": {
+      "success": "Enviado con éxito, se está revisando",
+      "total_not_enough": "Cantidad a retirar insuficiente",
+      "under_can_score": "Cantidad de retirada mínima {0}",
+      "over_can_score": "Cantidad de retirada máxima {0}",
+      "exceed_count_limit": "Solo puedes solicitar {0} veces al día",
+      "user_score_not_enough": "Fichas insuficientes",
+      "user_in_game": "Lo siento, te encuentras en una partida",
+      "need_recharge": "La cantidad de retirada es demasiado grande, debes recargar primero",
+      "btn_to_recharge": "Recargar",
+      "unbound_account": "No hay cuenta bancaria vinculada, no puedes retirar",
+      "account_abnormal": "El sistema detectó anomalías en tu cuenta, por lo que se te ha prohibido la retirada, contacta con atención al cliente",
+      "score_null": "No introdujiste la cantidad a retirar"
+    },
     "help": {
       "title": "Reglas de Retiro",
       "rule_1": "1. El monto mínimo/máximo que puedes retirar cada vez es {0}/{1};",

+ 14 - 0
src/locales/languages/pt_BR.json

@@ -333,6 +333,20 @@
       "processing": "Processando",
       "detail_title": "Detalhes do Registro"
     },
+    "tip": {
+      "success": "O envio foi bem-sucedido e o sistema está em revisão",
+      "total_not_enough": "O valor a ser sacado não é suficiente",
+      "under_can_score": "A quantidade de retirada única não pode ser inferior a {0}",
+      "over_can_score": "A quantidade de retirada única não pode ser superior a {0}",
+      "exceed_count_limit": "apenas {0} solicitações de saque podem ser iniciadas por dia",
+      "user_score_not_enough": "Seu Ficha não é suficiente",
+      "user_in_game": "Desculpe,você está no jogo por enquanto",
+      "need_recharge": "O valor da sua solicitação de saque é muito alto, você deve completar antes de continuar a sacar",
+      "btn_to_recharge": "Para recarregar",
+      "unbound_account": "Você não vinculou uma conta bancária e não pode sacar",
+      "account_abnormal": "O sistema detectou uma operação anormal em sua conta,e sua retirada foi banida. Entre em contato com o atendimento ao cliente",
+      "score_null": "Você não preencheu o valor da retirada"
+    },
     "help": {
       "title": "Regras de Retirada",
       "rule_1": "1. O valor mínimo/máximo que você pode retirar a cada vez é {0}/ {1};",

+ 14 - 0
src/locales/languages/ru_RU.json

@@ -333,6 +333,20 @@
       "processing": "Обработка",
       "detail_title": "Детали записи"
     },
+    "tip": {
+      "success": "Подача была успешной, и система находится в процессе обработки",
+      "total_not_enough": "Сумма для вывода недостаточна",
+      "under_can_score": "Количество отдельного вывода не может быть меньше {0}",
+      "over_can_score": "Количество отдельного вывода не может быть больше {0}",
+      "exceed_count_limit": "Вы можете начать {0} запросов на вывод в день",
+      "user_score_not_enough": "У вас недостаточно Chip",
+      "user_in_game": "Извините, вы находитесь в игре",
+      "need_recharge": "Сумма вашего запроса на вывод слишком велика, вы должны пополнить баланс, прежде чем продолжить вывод",
+      "btn_to_recharge": "Пополнить баланс",
+      "unbound_account": "Вы не связали банковскую счет и не можете вывести",
+      "account_abnormal": "Система обнаружила ненормальное действие в вашей учетной записи и запретила вывод. Пожалуйста, свяжитесь с службой поддержки",
+      "score_null": "Вы не заполнили сумму для вывода"
+    },
     "help": {
       "title": "Правила вывода",
       "rule_1": "1. Минимальная/максимальная сумма, которую вы можете вывести каждый раз, составляет {0}/{1};",

+ 14 - 0
src/locales/languages/zh_TW.json

@@ -333,6 +333,20 @@
       "processing": "處理中",
       "detail_title": "記錄詳情"
     },
+    "tip": {
+      "success": "提交成功,系统正在审核中",
+      "total_not_enough": "可提取金额不足",
+      "under_can_score": "单次提取数量不能少于 {0}",
+      "over_can_score": "单次提取数量不能超过 {0}",
+      "exceed_count_limit": "每天只能发起 {0} 次提取请求",
+      "user_score_not_enough": "您的筹码不足",
+      "user_in_game": "抱歉,您目前正在游戏中",
+      "need_recharge": "您的提取请求金额过高,请充值后再继续提取",
+      "btn_to_recharge": "去充值",
+      "unbound_account": "您未绑定银行账户,无法提取",
+      "account_abnormal": "系统检测到您的账户有异常操作,已禁止提取,请联系客服处理",
+      "score_null": "您未填写提取金额"
+    },
     "help": {
       "title": "提現規則",
       "rule_1": "1. 每次提現的最低/最高金額為 {0}/{1};",

+ 27 - 5
src/widgets/WWithdraw/BR/BRWithdraw.jsx

@@ -3,7 +3,7 @@ import styles from "./styles.module.scss";
 import React, {useState,useEffect} from "react";
 import {useDispatch, useSelector} from "react-redux";
 import {getUserInfo} from "@features/mainSlice";
-import {numFormatter, stringFormat} from "@utils/helpers";
+import {formatCash, numFormatter, stringFormat} from "@utils/helpers";
 import {getWDPayoutStatus, getWithdrawBaseInfo} from "@features/paySlice";
 import symbol from "@assets/symbol-defs.svg";
 import {ReactComponent as Edit} from '@assets/singlesvg/edit.svg';
@@ -51,6 +51,27 @@ const BRWithdraw=()=>{
             toast.error(i18n.t("withdraw.main.unbound_account"))
             return;
         }
+        let inputNum = Number(wdValue)*global.CASH_BASE;
+        let lnum = info.OrderLimit - info.OrderCount;
+        // data.WithDrawMin, data.WithDrawMax
+        let min=info.MinExchange;
+        let max=info.MaxExchange;
+        let maxEx=Number(info.SumCanExchange);
+        if (inputNum<min){
+            toast.error(stringFormat(i18n.t("withdraw.tip.under_can_score"),[formatCash(min,0)]))
+            return;
+        }
+        if (inputNum>max){
+            toast.error(stringFormat(i18n.t("withdraw.tip.over_can_score"),[formatCash(max,0)]))
+            return;
+        }
+        if (inputNum>maxEx){
+            toast.error(i18n.t("withdraw.tip.total_not_enough"))
+            return;
+        }
+        if (lnum<=0){
+            return;
+        }
         let num=Number(wdValue);
         if (num>0){
             dispatch(reqWithdrawPayout({
@@ -110,7 +131,7 @@ const BRWithdraw=()=>{
                                         onClick={()=>{
                                             let value=item===-1?getShowCash(info.SumCanExchange)+"":item+"";
                                             let fvalue=formatInput(value);
-                                            let addIndx=value===fvalue?index:-1;
+                                            let addIndx=Number(value)===fvalue?index:-1;
                                             if (addIndx!==-1)setWdValue(fvalue);
                                             setAddIndex(addIndx);
                                         }}
@@ -128,9 +149,10 @@ const BRWithdraw=()=>{
                         type={"number"}
                         placeholder={i18n.t("withdraw.main.editPlaceholder")}
                         onChange={(e)=>{
-                            let value=formatInput(e.target.value);
-                            setWdValue(value);
-                            setAddIndex(getAddIndexFromValue(value));
+                            // let value=formatInput(e.target.value);
+                            // setWdValue(value);
+                            // setAddIndex(getAddIndexFromValue(value));
+                            setWdValue(e.target.value);
                         }}
                     />
                     {