Commit 804536ef by 宋毅

tj

parent f261272a
...@@ -45,7 +45,7 @@ class AccessAuthAPI extends APIBase { ...@@ -45,7 +45,7 @@ class AccessAuthAPI extends APIBase {
} }
var tmpReslut = await this.cacheManager["VCodeCache"].getCache(appkey + "_" + mobile); var tmpReslut = await this.cacheManager["VCodeCache"].getCache(appkey + "_" + mobile);
if (tmpReslut) { if (tmpReslut) {
return system.getResult(system.redoFail, "操作过于频繁,请勿重复获取"); return system.getResultFail(system.redoFail, "操作过于频繁,请勿重复获取",system.redoFail);
} }
var vcodeResult = await this.cacheManager["VCodeCache"].cache(appkey + "_" + mobile, tmplCode, 120, signName); var vcodeResult = await this.cacheManager["VCodeCache"].cache(appkey + "_" + mobile, tmplCode, 120, signName);
return system.getResult(vcodeResult); return system.getResult(vcodeResult);
...@@ -64,7 +64,7 @@ class AccessAuthAPI extends APIBase { ...@@ -64,7 +64,7 @@ class AccessAuthAPI extends APIBase {
} }
var tmpReslut = await this.cacheManager["VCodeCache"].getCache(appkey + "_" + mobile); var tmpReslut = await this.cacheManager["VCodeCache"].getCache(appkey + "_" + mobile);
if (tmpReslut) { if (tmpReslut) {
return system.getResult(system.redoFail, "操作过于频繁,请勿重复获取"); return system.getResultFail(system.redoFail, "操作过于频繁,请勿重复获取",system.redoFail);
} }
var vcodeResult = this.cacheManager["VCodeCache"].cache(appkey + "_" + mobile, null, 120); var vcodeResult = this.cacheManager["VCodeCache"].cache(appkey + "_" + mobile, null, 120);
return system.getResult(vcodeResult); return system.getResult(vcodeResult);
...@@ -243,7 +243,7 @@ class AccessAuthAPI extends APIBase { ...@@ -243,7 +243,7 @@ class AccessAuthAPI extends APIBase {
} }
var cacheCode = await this.cacheManager["VCodeCache"].cache(appkey + "_" + pobj.mobile, null); var cacheCode = await this.cacheManager["VCodeCache"].cache(appkey + "_" + pobj.mobile, null);
if (!cacheCode || pobj.vcode != cacheCode.vcode) { if (!cacheCode || pobj.vcode != cacheCode.vcode) {
return system.getResult(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证."); return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail);
} }
var param = { var param = {
app_id: req.app.id, app_id: req.app.id,
...@@ -399,7 +399,7 @@ class AccessAuthAPI extends APIBase { ...@@ -399,7 +399,7 @@ class AccessAuthAPI extends APIBase {
} }
var cacheCode = await this.cacheManager["VCodeCache"].cache(appkey + "_" + pobj.mobile, null); var cacheCode = await this.cacheManager["VCodeCache"].cache(appkey + "_" + pobj.mobile, null);
if (!cacheCode || pobj.vcode != cacheCode.vcode) { if (!cacheCode || pobj.vcode != cacheCode.vcode) {
return system.getResult(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证."); return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail);
} }
var param = { var param = {
app_id: req.app.id, app_id: req.app.id,
...@@ -436,7 +436,7 @@ class AccessAuthAPI extends APIBase { ...@@ -436,7 +436,7 @@ class AccessAuthAPI extends APIBase {
} }
var cacheuser = await this.userSve.authByCode(pobj.opencode); var cacheuser = await this.userSve.authByCode(pobj.opencode);
if (!cacheuser) { if (!cacheuser) {
return system.getResult(system.verifyOpencodeFail, "opencode存储的值已经失效,请重新获取用户的opencode."); return system.getResultFail(system.verifyOpencodeFail, "opencode存储的值已经失效,请重新获取用户的opencode.", system.verifyOpencodeFail);
} }
return system.getResultSuccess(cacheuser); return system.getResultSuccess(cacheuser);
} }
......
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