|
@@ -59,9 +59,14 @@ export default function Login() { |
|
|
}) |
|
|
}) |
|
|
.success(() => { |
|
|
.success(() => { |
|
|
// 记录账号密码 |
|
|
// 记录账号密码 |
|
|
if (isClient && keepPass) { |
|
|
|
|
|
storage.set('account', account, true); |
|
|
|
|
|
storage.set('password', password, true); |
|
|
|
|
|
|
|
|
if (isClient) { |
|
|
|
|
|
if (keepPass) { |
|
|
|
|
|
storage.set('account', account, true); |
|
|
|
|
|
storage.set('password', password, true); |
|
|
|
|
|
} else { |
|
|
|
|
|
storage.remove('account'); |
|
|
|
|
|
storage.remove('password'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
// history.push('/'); |
|
|
// history.push('/'); |
|
|
// window.location.href = '/'; |
|
|
// window.location.href = '/'; |
|
@@ -69,7 +74,7 @@ export default function Login() { |
|
|
refresh(); |
|
|
refresh(); |
|
|
// window.location.reload(); |
|
|
// window.location.reload(); |
|
|
}); |
|
|
}); |
|
|
}, [account, password]); |
|
|
|
|
|
|
|
|
}, [account, password, keepPass]); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
setErrText(''); |
|
|
setErrText(''); |
|
|