diff --git a/src/page/Login/index.tsx b/src/page/Login/index.tsx index 9dcc27b..79dfb86 100644 --- a/src/page/Login/index.tsx +++ b/src/page/Login/index.tsx @@ -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('账号不存在!')