diff --git a/mock/user.js b/mock/user.js index f92944599e68a26ea55a7b9d53df4ab168e17b63..86d52e3b22da57ba305c0f6a1994cdc301923492 100644 --- a/mock/user.js +++ b/mock/user.js @@ -73,7 +73,7 @@ export default { ], 'POST /api/login/account': (req, res) => { const { password, userName, type } = req.body; - if (password === '888888' && userName === 'admin') { + if (password === 'ant.design' && userName === 'admin') { res.send({ status: 'ok', type, @@ -81,7 +81,7 @@ export default { }); return; } - if (password === '123456' && userName === 'user') { + if (password === 'ant.design' && userName === 'user') { res.send({ status: 'ok', type, diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js index 5c9123729b86e9ad4d98d141d79d1ee220846bdc..3937cc80b1dfa470794b3cb088164fddc4b3b4fb 100644 --- a/src/pages/User/Login.js +++ b/src/pages/User/Login.js @@ -81,10 +81,10 @@ class LoginPage extends Component { login.type === 'account' && !submitting && this.renderMessage(formatMessage({ id: 'app.login.message-invalid-credentials' }))} - + this.loginForm.validateFields(this.handleSubmit)} />