|
@@ -44,7 +44,11 @@ module.exports = app => {
|
|
|
const result = await ctx.service.projectAccount.accountLogin(ctx.request.body, loginType);
|
|
|
|
|
|
if (!result) {
|
|
|
- throw '登录失败';
|
|
|
+ throw '用户名或密码错误';
|
|
|
+ }
|
|
|
+
|
|
|
+ if (result === 2) {
|
|
|
+ throw '该账号已被停用,请联系销售人员';
|
|
|
}
|
|
|
|
|
|
// 判断是否已经有对应用户信息,没有则跳转初始化页面
|
|
@@ -55,7 +59,7 @@ module.exports = app => {
|
|
|
ctx.redirect(query.referer ? query.referer : url);
|
|
|
} catch (error) {
|
|
|
this.log(error);
|
|
|
- ctx.session.loginError = '用户名或密码错误';
|
|
|
+ ctx.session.loginError = error;
|
|
|
ctx.redirect('/login');
|
|
|
}
|
|
|
}
|