Przeglądaj źródła

Ru 账号设置

zhejiushizhuce 2 lat temu
rodzic
commit
92d1fc3fbf

+ 1 - 0
src/api/config.js

@@ -66,6 +66,7 @@ export const APP_WITHDRAW_SET_INFO=BASE_PREFIX+"withDraw/withDrawInfo";
 export const APP_WITHDRAW_PAYOUT=BASE_PREFIX+"withDraw/payout";
 export const APP_FORGET_PAY_PASS=BASE_PREFIX+"forgetPayPass";
 export const APP_MEX_WITHDRAW_SET_INFO=BASE_PREFIX+"withDraw/mexWithDrawInfo";
+export const APP_RU_WITHDRAW_SET_INFO=BASE_PREFIX+"withDraw/ruWithDrawInfo";
 //withdraw
 //userinfo
 export const APP_GAME_INFO=BASE_PREFIX+"info";

+ 28 - 1
src/features/api.js

@@ -37,7 +37,7 @@ import {
     APP_REDPACK_CONFIG,
     APP_REDPACK_RECEIVE,
     APP_REGISTER,
-    APP_ROUTES, APP_SAVE_CPF,
+    APP_ROUTES, APP_RU_WITHDRAW_SET_INFO, APP_SAVE_CPF,
     APP_SEND_CODE,
     APP_SMS_LOGIN,
     APP_TURNPLATE_BONUS,
@@ -531,6 +531,33 @@ export const reqMexWithdrawSetInfo=createAsyncThunk(
         return response;
     }
 )
+export const reqRuWithdrawSetInfo=createAsyncThunk(
+    APP_RU_WITHDRAW_SET_INFO,
+    async (arg,thunkAPI) => {
+        let pass=global.getWDPass();
+        let pdata={
+            paypass:pass,
+            userName:arg.userName,
+            PixType:arg.PixType
+        }
+        if (arg.PixType==="1"){
+            pdata.account=arg.account;
+        }
+        else if (arg.PixType==="2"){
+            pdata.phone=arg.phone;
+            pdata.bank=arg.bank;
+        }
+        let params={
+            url:APP_RU_WITHDRAW_SET_INFO,
+            data:pdata
+        }
+        const response=await Http.post(params);
+        if (response&&response.code===200){
+            thunkAPI.dispatch(reqWithdrawBaseInfo());
+        }
+        return response;
+    }
+)
 //withdraw
 //用户信息
 export const reqGameInfo=createAsyncThunk(

+ 2 - 1
src/features/paySlice.js

@@ -7,7 +7,7 @@ import {
     reqGetAccountsPayInfo, reqMexWithdrawSetInfo,
     reqPaymentOrder,
     reqPayOrderList,
-    reqRechargeConfig,
+    reqRechargeConfig, reqRuWithdrawSetInfo,
     reqWithdrawBaseInfo,
     reqWithdrawInfo,
     reqWithdrawPayout,
@@ -313,6 +313,7 @@ export const Pay=createSlice({
         buildReqReducer(builder,reqForgetPayPass,reducerChangePayPass,changePayPassStatus);
         buildReqReducer(builder,reqMexWithdrawSetInfo,reducerWithdrawSetInfo,withdrawSetInfoStatus);
         buildReqReducer(builder,reqCPFSave,reducerSaveCPF,saveCPFStatus);
+        buildReqReducer(builder,reqRuWithdrawSetInfo,reducerWithdrawSetInfo,withdrawSetInfoStatus);
     },
 })
 export const {updatePayFinish,setChangePayPassType} = Pay.actions;

+ 1 - 1
src/locales/languages/en_US.json

@@ -407,7 +407,7 @@
       "clabe_help_4": "1 digit: validation of CLABE number"
     },
     "account_ru": {
-      "userName": "Name",
+      "userName": "Full Name",
       "name_holder": "Enter Name",
       "email": "Email",
       "email_holder": "Input Email-ID",

+ 1 - 1
src/locales/languages/es_MX.json

@@ -402,7 +402,7 @@
       "clabe_help_4": "1 dígito: validación del número CLABE"
     },
     "account_ru": {
-      "userName": "Nombre",
+      "userName": "Nombre completo",
       "name_holder": "Introduce el nombre",
       "email": "Correo",
       "email_holder": "Introduce el correo electrónico",

+ 1 - 1
src/locales/languages/pt_BR.json

@@ -402,7 +402,7 @@
       "clabe_help_4": "1 dígito: validação do número CLABE"
     },
     "account_ru": {
-      "userName": "Nome",
+      "userName": "Nome completo",
       "name_holder": "Nome de entrada",
       "email": "E-mail",
       "email_holder": "insira o e-mail",

+ 1 - 1
src/locales/languages/ru_RU.json

@@ -402,7 +402,7 @@
       "clabe_help_4": "1 цифра: проверка номера CLABE"
     },
     "account_ru": {
-      "userName": "Имя",
+      "userName": "Полное имя",
       "name_holder": "Введите имя",
       "email": "Электронная почта",
       "email_holder": "Введите идентификатор электронной почты",

+ 4 - 11
src/widgets/WWithdraw/BR/BRWithdraw.jsx

@@ -148,20 +148,13 @@ const BRWithdraw=()=>{
             let PixType=info.PixType;
             let BranchBank=info.BranchBank;
             if (PixType==="1"){
-               if(AccountsBank!=null&&AccountsBank!=="")accout=AccountsBank;
+                if(AccountsBank!=null&&AccountsBank!=="")accout=AccountsBank;
+                via=i18n.t("withdraw.account_ru.pix_type_1");
             }
-            else
+            else if (PixType==="2")
             {
                 if(PhoneNumber!=null&&PhoneNumber!=="")accout=PhoneNumber;
-            }
-            if (BranchBank!=null&&BranchBank!==""){
-                if (accountInfo!=null){
-                    let bank_list=accountInfo.bank_list;
-                    if (bank_list!=null){
-                        via=bank_list[BranchBank];
-                    }
-                }
-                else via=BranchBank;
+                via=i18n.t("withdraw.account_ru.pix_type_2")
             }
         }
         else

+ 52 - 64
src/widgets/WWithdraw/RU/RUAccountEdit.jsx

@@ -1,5 +1,5 @@
 import React, {useEffect, useRef, useState} from "react";
-import {reqMexWithdrawSetInfo, reqWithdrawInfo, reqWithdrawSetInfo} from "@features/api";
+import {reqMexWithdrawSetInfo, reqRuWithdrawSetInfo, reqWithdrawInfo, reqWithdrawSetInfo} from "@features/api";
 import {useDispatch, useSelector} from "react-redux";
 import {getUserInfo} from "@features/mainSlice";
 import {getWDBaseInfoStatus, getWDInfoStatus, getWDSetInfoStatus, getWithdrawInfo} from "@features/paySlice";
@@ -49,6 +49,12 @@ const RUAccountEdit=({close})=>{
     useEffect(()=>{
         dispatch(reqWithdrawInfo({UserID:user.UserID}));
     },[])
+    useEffect(()=>{
+        if (info!=null){
+            setBankNo(info.BranchBank||"");
+            setShowPixType(dinfo.PixType||"1")
+        }
+    },[info])
     const checkLockStatus=()=>{
         if (baseStatus===REQ_STATUS.LOADING)return true;
         if (setStatus===REQ_STATUS.LOADING)return true;
@@ -120,7 +126,7 @@ const RUAccountEdit=({close})=>{
         if (checkLockStatus())return;
         data.bank=bankNo;
         data.callback=callback;
-        dispatch(reqWithdrawSetInfo(data));
+        dispatch(reqRuWithdrawSetInfo(data));
     }
     const renderAccoutForm=()=>{
         return (
@@ -128,26 +134,49 @@ const RUAccountEdit=({close})=>{
                 handleChange(data);
             })}>
                 {
-                    showPixType==="1"?(
-                        <Controller control={control}
-                                    name="userName"
-                                    rules={{required: true}}
-                                    render={({field: {ref, onChange, value}, fieldState: {error}}) => (
-                                        <div className={styles.form_item}>
-                                            <div className={styles.title}>{i18n.t("withdraw.account_ru.userName")}</div>
-                                            <div className={`input-control ${error ? 'input-control--error' : ''}`}>
-                                                <input
-                                                    value={value}
-                                                    onChange={e => onChange(e.target.value)}
-                                                    placeholder={i18n.t('withdraw.account_ru.name_holder')}
-                                                    ref={ref}
-                                                />
-                                            </div>
+                    <Controller control={control}
+                                name="userName"
+                                rules={{required: true}}
+                                render={({field: {ref, onChange, value}, fieldState: {error}}) => (
+                                    <div className={styles.form_item}>
+                                        <div className={styles.title}>{i18n.t("withdraw.account_ru.userName")}</div>
+                                        <div className={`input-control ${error ? 'input-control--error' : ''}`}>
+                                            <input
+                                                value={value}
+                                                onChange={e => onChange(e.target.value)}
+                                                placeholder={i18n.t('withdraw.account_ru.name_holder')}
+                                                ref={ref}
+                                            />
                                         </div>
-                                    )}
-                        />
-                    ):(<></>)
+                                    </div>
+                                )}
+                    />
                 }
+                <Controller control={control}
+                            name="PixType"
+                            rules={{required: true}}
+                            render={({field: {ref, onChange, value}, fieldState: {error}}) => (
+                                <div className={styles.form_item}>
+                                    <div className={styles.title}>{i18n.t("withdraw.account_ru.withdraw_via")}</div>
+                                    <div className={styles.pix_con}>
+                                        <RadioBtn className={styles.radio_type} selected={(value + "") === "1"}
+                                                  value={"1"} onChange={(value) => {
+                                            setShowPixType(value)
+                                            onChange(value);
+                                        }}>
+                                            <span>{i18n.t("withdraw.account_ru.pix_type_1")}</span>
+                                        </RadioBtn>
+                                        <RadioBtn className={styles.radio_type} selected={(value + "") === "2"}
+                                                  value={"2"} onChange={(value) => {
+                                            setShowPixType(value)
+                                            onChange(value);
+                                        }}>
+                                            <span>{i18n.t("withdraw.account_ru.pix_type_2")}</span>
+                                        </RadioBtn>
+                                    </div>
+                                </div>
+                            )}
+                />
                 {
                     showPixType==="1"?(<></>):(
                         <Controller control={control}
@@ -170,23 +199,6 @@ const RUAccountEdit=({close})=>{
                         />
                     )
                 }
-                <Controller control={control}
-                            name="email"
-                            rules={{required: true, validate: validateMail}}
-                            render={({field: {ref, onChange, value}, fieldState: {error}}) => (
-                                <div className={styles.form_item}>
-                                    <div className={styles.title}>{i18n.t("withdraw.account_ru.email")}</div>
-                                    <div className={`input-control ${error ? 'input-control--error' : ''}`}>
-                                        <input
-                                            value={value}
-                                            onChange={e => onChange(e.target.value)}
-                                            placeholder={i18n.t('withdraw.account_ru.email_holder')}
-                                            ref={ref}
-                                        />
-                                    </div>
-                                </div>
-                            )}
-                />
                 {
                     showPixType==="1"?(
                         <Controller control={control}
@@ -209,8 +221,8 @@ const RUAccountEdit=({close})=>{
                     ):(<></>)
                 }
                 {
-                    // showPixType==="1"?(<></>):(
-                    (
+                    showPixType==="1"?(<></>):(
+                    // (
                         <Controller control={control}
                                     name="bankName"
                                     rules={{validate: validateBankCode}}
@@ -242,31 +254,7 @@ const RUAccountEdit=({close})=>{
                         />
                     )
                 }
-                <Controller control={control}
-                            name="PixType"
-                            rules={{required: true}}
-                            render={({field: {ref, onChange, value}, fieldState: {error}}) => (
-                                <div className={styles.form_item}>
-                                    <div className={styles.title}>{i18n.t("withdraw.account_ru.withdraw_via")}</div>
-                                    <div className={styles.pix_con}>
-                                        <RadioBtn className={styles.radio_type} selected={(value + "") === "1"}
-                                                  value={"1"} onChange={(value) => {
-                                            setShowPixType(value)
-                                            onChange(value);
-                                        }}>
-                                            <span>{i18n.t("withdraw.account_ru.pix_type_1")}</span>
-                                        </RadioBtn>
-                                        <RadioBtn className={styles.radio_type} selected={(value + "") === "2"}
-                                                  value={"2"} onChange={(value) => {
-                                            setShowPixType(value)
-                                            onChange(value);
-                                        }}>
-                                            <span>{i18n.t("withdraw.account_ru.pix_type_2")}</span>
-                                        </RadioBtn>
-                                    </div>
-                                </div>
-                            )}
-                />
+
                 <button className={`button-green ${styles.btn_save}`}>
                     {checkLockStatus() ? (
                         <SmallLoading fill={"#FFF"}></SmallLoading>) : i18n.t("withdraw.account.btn_save")}