|
@@ -142,7 +142,9 @@ module.exports = app => {
|
|
|
throw '该微信号未绑定此项目';
|
|
|
}
|
|
|
if (pa.enable !== 1) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(projectData.id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
// 设置项目和用户session记录
|
|
|
const result = await ctx.service.projectAccount.accountLogin({ project: projectData, accountData: pa }, 3);
|
|
@@ -176,7 +178,11 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
if (result === 2) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 查找项目数据
|
|
|
+ const projectData = await this.ctx.service.project.getProjectByCode(ctx.request.body.project.toString().trim());
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(projectData.id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
|
|
|
// 调用 rotateCsrfSecret 刷新用户的 CSRF token
|
|
@@ -320,7 +326,9 @@ module.exports = app => {
|
|
|
throw '';
|
|
|
} else {
|
|
|
if (pa.enable !== 1) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(ctx.projectData.id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
const result = await ctx.service.projectAccount.accountLogin({ project: ctx.projectData, accountData: pa }, 3);
|
|
|
if (!result) {
|
|
@@ -373,7 +381,9 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
if (pa.enable !== 1) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(pa.project_id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
const updateData = {
|
|
|
bind: 1,
|
|
@@ -544,7 +554,9 @@ module.exports = app => {
|
|
|
throw '您无权限登录系统。';
|
|
|
}
|
|
|
if (account.enable !== 1) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(project.id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
const result = await ctx.service.projectAccount.accountLogin({ project, accountData: account }, 3);
|
|
|
if (!result) {
|
|
@@ -612,7 +624,9 @@ module.exports = app => {
|
|
|
throw '用户名或密码错误';
|
|
|
}
|
|
|
if (result === 2) {
|
|
|
- throw '该账号已被停用,请联系销售人员';
|
|
|
+ // 判断是否有设置停用提示,有则展示
|
|
|
+ const msg = await ctx.service.projectStopmsg.getMsg(projectData.id);
|
|
|
+ throw msg;
|
|
|
}
|
|
|
} catch (error) {
|
|
|
response.code = -1;
|