|
@@ -3,7 +3,7 @@ import { getFindPwdApi, getSendCodeApi } from "@/api/user";
|
|
|
import ButtonOwn from "@/components/ButtonOwn";
|
|
|
import DomainFooter from "@/components/DomainFooter";
|
|
|
import HeaderBack from "@/components/HeaderBack";
|
|
|
-import { useRouter } from "@/i18n/routing";
|
|
|
+import { Link, useRouter } from "@/i18n/routing";
|
|
|
import { useUserInfoStore } from "@/stores/useUserInfoStore";
|
|
|
import { Form, Input, Toast } from "antd-mobile";
|
|
|
import { FormInstance } from "antd-mobile/es/components/form";
|
|
@@ -77,7 +77,7 @@ const ResetPhone: FC<Props> = () => {
|
|
|
};
|
|
|
const checkValidator = (rules: any, value: string) => {
|
|
|
const password = formRef.current?.getFieldValue("pwd");
|
|
|
- if (value !== password) {
|
|
|
+ if (value === password) {
|
|
|
return Promise.reject(new Error(t("form.checkPwdReg")));
|
|
|
}
|
|
|
return Promise.resolve();
|
|
@@ -102,6 +102,27 @@ const ResetPhone: FC<Props> = () => {
|
|
|
onValuesChange={onValuesChange}
|
|
|
footer={<ButtonOwn active>{t("confirmPwdPage.complete")}</ButtonOwn>}
|
|
|
>
|
|
|
+ <Form.Item
|
|
|
+ name="pwd"
|
|
|
+ label=""
|
|
|
+ extra={
|
|
|
+ <span
|
|
|
+ className={spanClassName}
|
|
|
+ onClick={() => setVisible(!visible)}
|
|
|
+ ></span>
|
|
|
+ }
|
|
|
+ rules={[
|
|
|
+ { required: true, message: t("form.passwordReg") },
|
|
|
+ { min: 6, max: 20, message: t("form.passwordMinReg") },
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ <Input
|
|
|
+ placeholder={t("form.newPwd")}
|
|
|
+ maxLength={20}
|
|
|
+ type={visible ? "text" : "password"}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+
|
|
|
<Form.Item
|
|
|
name="pwd"
|
|
|
label=""
|
|
@@ -136,7 +157,13 @@ const ResetPhone: FC<Props> = () => {
|
|
|
<Input placeholder={t("form.checkPwd")} maxLength={20} type={"password"} />
|
|
|
</Form.Item>
|
|
|
</Form>
|
|
|
+ <div className={"text-right"}>
|
|
|
+ <Link href={"/resetPhone"} className={"text-[#fff]"}>
|
|
|
+ {t("LoginPage.forgetPwd")}
|
|
|
+ </Link>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
<DomainFooter />
|
|
|
</div>
|
|
|
);
|