chore(users): remove unnecessary route guard & log

This commit is contained in:
haitao(lj) 2022-11-28 16:08:12 +08:00
parent 3f910b76a2
commit 32d64b40b9
3 changed files with 0 additions and 21 deletions

View File

@ -76,7 +76,6 @@ const Index: FC = () => {
params.captcha_code = formData.captcha_code.value;
params.captcha_id = imgCode.captcha_id;
}
changeEmail(params)
.then(() => {
userInfo.e_mail = formData.e_mail.value;
@ -85,14 +84,6 @@ const Index: FC = () => {
setModalState(false);
})
.catch((err) => {
// if (err.isError && err.key) {
// formData[err.key].isInvalid = true;
// formData[err.key].errorMsg = err.value;
// if (err.key.indexOf('captcha') < 0) {
// setModalState(false);
// }
// }
// setFormData({ ...formData });
if (err.isError) {
const data = handleFormError(err, formData);
if (err.list.filter((v) => v.error_field.indexOf('captcha') < 0)) {
@ -109,7 +100,6 @@ const Index: FC = () => {
const handleSubmit = async (event: any) => {
event.preventDefault();
event.stopPropagation();
if (!checkValidated()) {
return;
}

View File

@ -196,7 +196,6 @@ const Index: React.FC = () => {
if (res.e_mail) {
const str = res.e_mail.toLowerCase().trim();
const hash = MD5(str);
console.log(str, hash, mailHash);
setMailHash(hash);
}
});

View File

@ -153,9 +153,6 @@ const routes: RouteNode[] = [
{
path: 'users/change-email',
page: 'pages/Users/ChangeEmail',
guard: async () => {
return guard.notActivated();
},
},
{
path: 'users/password-reset',
@ -167,13 +164,6 @@ const routes: RouteNode[] = [
{
path: 'users/account-activation',
page: 'pages/Users/ActiveEmail',
// guard: async () => {
// const notActivated = guard.notActivated();
// if (notActivated.ok) {
// return notActivated;
// }
// return guard.notLogged();
// },
},
{
path: 'users/account-activation/success',