登录优化

This commit is contained in:
yj 2024-08-23 10:20:42 +08:00
parent 7c5c6d00d2
commit f425ac144b
1 changed files with 9 additions and 0 deletions

View File

@ -82,6 +82,15 @@ const Login: React.FC = () => {
if (!operation.account) {
return message.error('请输入账号!')
}
if (storage.getItem('login')) {
const login = JSON.parse(storage.getItem('login') as string);
if (login.account !== operation.account) {
setOperation({
...operation,
password: '',
})
}
}
GetCheckUser(operation.account).then(res => {
if (res.code === 200) {
res.data ? setAccountPasswordStatus(true) : message.error('账号不存在!')