This commit is contained in:
hailin 2025-03-14 19:46:57 +08:00
parent 67466cb3cd
commit 86292da531
3 changed files with 10 additions and 22 deletions

View File

@ -88,13 +88,13 @@ export function MixSignUp(props: {
setTransferLoading(false);
}, []);
const signUpWithCode = async (email: string, password: string) => {
const signUpWithCode = async (username: string, password: string) => {
console.log("-------------", email)
console.log("-------------", username)
if (
isLoading ||
typeof email !== "string"
typeof username !== "string"
) {
return null;
}
@ -120,20 +120,12 @@ export function MixSignUp(props: {
toast.success(result.header.message)
props.setVerification(true);
// 自身方法
// localStorage.setItem("data", JSON.stringify(result.data));
// []方法
{ {/* localStorage["name"]="bonly"; */ } }
}).catch((err: any) => {
setIsLoading(false);
console.log(err);
// if (err.errors[0].code === "form_identifier_not_found") {
// props.setAccountNotFound(true);
// props.email(email);
// } else {
// props.setError("Sorry, We couldn't sign you in. Please try again later");
// }
});
} catch (error) {
setIsLoading(false);
@ -190,7 +182,6 @@ export function MixSignUp(props: {
autoCapitalize="none"
autoComplete="on"
autoCorrect="off"
required
className="h-10 text-black duration-500 bg-transparent focus:text-black border-black/20 focus:bg-white focus:border-black rounded hover:bg-white/20 hover:border-black/40 placeholder:black/20 "
/>
</div>
@ -201,7 +192,6 @@ export function MixSignUp(props: {
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
disabled={isLoading}
>
{/* {isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Sign Up with Email"} */}
{t("next")}
</button>
@ -216,7 +206,9 @@ export function MixSignUp(props: {
toast.error("two passwords do not match")
return
}
await signUpWithCode(props.emailValue, password)
setGoPassword(false)
}} >
@ -229,7 +221,6 @@ export function MixSignUp(props: {
name="password"
placeholder={t("password")}
type={showPassword ? "text" : "password"}
// defaultValue={props.passwordValue}
autoCapitalize="none"
autoComplete="email"
autoCorrect="off"
@ -238,7 +229,6 @@ export function MixSignUp(props: {
/>
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
setShowPassword(!showPassword)
// toast.success('coming soon')
}} />
</div>
</div>
@ -254,7 +244,6 @@ export function MixSignUp(props: {
name="confirmPassword"
placeholder={t("confirm_password")}
type={showPassword2 ? "text" : "password"}
// defaultValue={props.passwordValue}
autoCapitalize="none"
autoComplete="password"
autoCorrect="off"
@ -263,7 +252,6 @@ export function MixSignUp(props: {
/>
<Image src={showImage} width={16} alt="show" className="absolute right-4 top-3" onClick={() => {
setShowPassword2(!showPassword2)
// toast.success('coming soon')
}} />
</div>
@ -274,7 +262,6 @@ export function MixSignUp(props: {
className="flex items-center justify-center h-10 gap-2 px-4 mt-8 text-sm font-semibold text-white duration-200 bg-black border border-black rounded hover:border-black/30 hover:bg-black/80 hover:text-white"
disabled={isLoading}
>
{/* {isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Sign Up with Email"} */}
{isLoading ? <Loading className="w-4 h-4 animate-spin" /> : "Next"}
</button>

View File

@ -7,6 +7,7 @@
"email": "Email",
"regname": "User Name",
"referralcode": "Referral Code",
"refcode": "Referral Code (Optional)",
"mixaccount": "Phone/Email",
"first_name": "First Name",
"password": "Password",
@ -30,7 +31,7 @@
"verification_code": "Six-digit verification code",
"send_again": "Send Again",
"email_address": "Email Address",
"refcodeplaceholder": "Enter your referral code",
"refcodeplaceholder": "Enter your referral code(Optional)",
"mixplacehoder": "Enter your phone number or Email address",
"creat_account": "Creat Account",
"frogot_password": "Frogot password?",

View File

@ -7,7 +7,7 @@
"email": "邮箱",
"regname": "用户名",
"referralcode":"推荐码",
"refcode": "推荐码",
"refcode": "推荐码(选填)",
"mixaccount": "手机号/邮箱地址",
"first_name": "昵称",
"password": "密码",
@ -32,7 +32,7 @@
"send_again": "再次发送",
"email_address": "电子邮件地址",
"mixplacehoder": "输入你的手机号或者邮箱地址",
"refcodeplaceholder": "填入你的推荐码",
"refcodeplaceholder": "填写你的推荐码(选填)",
"creat_account": "创建帐户",
"frogot_password": "忘记密码?",
"account_not_found": "未找到帐户,您想注册吗?",