From 01a59363158988ea27ef0004455c462ce17876ec Mon Sep 17 00:00:00 2001 From: Jrenc <87536202+lulu546@users.noreply.github.com> Date: Fri, 19 Jul 2024 07:48:40 +0800 Subject: [PATCH] 1. end --- src/view/RegisterView.tsx | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/src/view/RegisterView.tsx b/src/view/RegisterView.tsx index a66982c..248fc9c 100644 --- a/src/view/RegisterView.tsx +++ b/src/view/RegisterView.tsx @@ -6,8 +6,9 @@ import { import axios from 'axios' import { ChangeEvent, FormEvent, useState } from 'react' import { useNavigate } from 'react-router-dom' -import { backend } from '../global' +import { backend, language } from '../global' +import { MessagePlugin } from 'tdesign-react' export default function RegisterView() { const [step, setStep] = useState(1) const list: Array<{ close: () => void }> = [] @@ -35,12 +36,12 @@ export default function RegisterView() { axios .post(backend + 'auth/register', formData) .then((res) => { - setMessage('注册成功') + MessagePlugin.success('注册成功') localStorage.setItem('token', res.data.token) navigate('/') }) .catch((err) => { - setMessage('注册失败') + MessagePlugin.error('密码小于八位') }) .finally(() => { setLoading(false) @@ -92,7 +93,7 @@ export default function RegisterView() {

01{' '} - 发送验证邮件 + 填写邮件

@@ -120,29 +121,6 @@ export default function RegisterView() { />
- -
- - -
)}