Commit 534192fe by v_vjyjiang

d

parent a75c723e
......@@ -106,13 +106,15 @@ class UserCtl extends CtlBase {
async pmlogin (pobj, qobj, req) {
//平台注册设置平台的应用ID
let rtn = await this.service.pmlogin(pobj, qobj, req);
let msg = null
if (!rtn) {//登录错误
let times = await this.service.cacheManager["LoginTimesCache"].incrAsync(pobj.userName);
if (times >= 4) {
await this.service.updateByWhere({ isEnabled: false }, { userName: pobj.userName })
msg = "登录超过4次失败,您的账户已被锁定,请联系管理员解锁."
}
}
return system.getResult(rtn);
return system.getResult(rtn, msg);
}
/**
* 重置密码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment