Commit 5cc9d348 by liangjianmin

fix(login): add delay before redirecting after successful login

- Introduced a 1-second delay before redirecting to the homepage upon successful login to enhance user experience.
- Cleaned up unnecessary whitespace in the login form validation logic.
parent 7155e0da
Showing with 4 additions and 2 deletions
......@@ -363,7 +363,7 @@
this.setError('mobile', '请输入手机号');
return false;
}
if (!this.form.password) {
this.setError('password', '请输入登录密码');
return false;
......@@ -402,7 +402,9 @@
message: '手机号已绑定账号',
type: 'success'
});
window.location.href = '/';
setTimeout(() => {
window.location.href = '/';
}, 1000);
}
} else if (res.code === 102) {
this.setError('captcha', res.msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment