Commit 559edb04 by 1808837298@qq.com

更新修改默认密码的提示

parent b7ac0b18
......@@ -90,14 +90,12 @@ const LoginForm = () => {
if (success) {
userDispatch({type: 'login', payload: data});
localStorage.setItem('user', JSON.stringify(data));
if (username === 'root' && password === '123456') {
navigate('/user/edit');
showSuccess('登录成功!');
if (username === 'root' && password === '123456') {
showWarning('请立刻修改默认密码!');
} else {
navigate('/token');
showSuccess('登录成功!');
Modal.error({title: '您正在使用默认密码!', content: '请立刻修改默认密码!'});
}
navigate('/token');
} else {
showError(message);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment