登录优化
This commit is contained in:
parent
7c5c6d00d2
commit
f425ac144b
|
|
@ -82,6 +82,15 @@ const Login: React.FC = () => {
|
||||||
if (!operation.account) {
|
if (!operation.account) {
|
||||||
return message.error('请输入账号!')
|
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 => {
|
GetCheckUser(operation.account).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
res.data ? setAccountPasswordStatus(true) : message.error('账号不存在!')
|
res.data ? setAccountPasswordStatus(true) : message.error('账号不存在!')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue