ソースを参照

Merge branch 'feature-Before' into dev

ansoni 4 ヶ月 前
コミット
6154746d7c

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

@@ -225,9 +225,9 @@ const WithdrawWidget: FC<Props> = (props) => {
         const params = { ...value, ...value.channel, amount: +value.amount };
 
         // 如果是电话号码,拼接区号
-        if (params.code_phone) {
-            params.account_no = `${params.code_phone}${params.account_no}`;
-        }
+        // if (params.code_phone) {
+        //     params.account_no = `${params.account_no}`;
+        // }
         delete params.channel;
 
         const { data } = await userInfoApi();

+ 9 - 3
src/components/Fields/MobileField.tsx

@@ -15,11 +15,13 @@ const columns = [["86", "01", "02", "03"]];
 interface MobileFieldProps {
     value?: MobileValue;
     onChange?: (value: MobileValue) => void;
+    code?: boolean;
 }
 
 const MobileField: FC<MobileFieldProps> = ({
     value = { preValue: "86", realValue: "" },
     onChange,
+    code = true,
 }) => {
     const [visible, setVisible] = useState(false);
     const t = useTranslations("form");
@@ -39,9 +41,13 @@ const MobileField: FC<MobileFieldProps> = ({
     return (
         <>
             <Space align="center">
-                <Space align="center" onClick={() => setVisible(true)}>
-                    <div className={"text-[#999]"}>+{value.preValue}</div>
-                </Space>
+                {code && (
+                    <>
+                        <Space align="center" onClick={() => setVisible(true)}>
+                            <div className={"text-[#999]"}>+{value.preValue}</div>
+                        </Space>
+                    </>
+                )}
                 <Input
                     value={value.realValue}
                     placeholder={t("phone")}