Authored by 陈峰

password验证失败时处理

@@ -217,10 +217,10 @@ const local = { @@ -217,10 +217,10 @@ const local = {
217 passport.authenticate('local', (err, user) => { 217 passport.authenticate('local', (err, user) => {
218 let loginSession = req.session.login; 218 let loginSession = req.session.login;
219 219
220 - if (err) { 220 + if (err || !user) {
221 let obj = { 221 let obj = {
222 code: 400, 222 code: 400,
223 - message: err, 223 + message: err || '登录出错请重试',
224 data: '' 224 data: ''
225 }; 225 };
226 226