From f425ac144b78722e4fadc112d523c85ff80eadb6 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Fri, 23 Aug 2024 10:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Login/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) 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('账号不存在!')