Browse Source

登录提示

release_0.0.2
巴林闲侠 2 years ago
parent
commit
4dad078802
  1. 10
      api/app/lib/controllers/auth/index.js

10
api/app/lib/controllers/auth/index.js

@ -75,10 +75,14 @@ async function login (ctx, next) {
// await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
let message = typeof error == 'string' ? error
: error.response.body.message || "登录失败"
if (message == '账号或密码错误') {
message = '无此用户,请使用正确的登录信息'
}
ctx.body = {
message:
typeof error == 'string' ? error
: error.response.body.message || "登录失败"
message: message
}
}
}

Loading…
Cancel
Save