Commit 01619c09 by 宋毅

tj

parent 2107b866
...@@ -288,11 +288,11 @@ class OpPlatformUtils { ...@@ -288,11 +288,11 @@ class OpPlatformUtils {
async getReqUserPinByLgoin(pobj) { async getReqUserPinByLgoin(pobj) {
var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.userName; var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.userName;
var cacheManager = system.getObject("db.common.cacheManager"); var cacheManager = system.getObject("db.common.cacheManager");
var result = await cacheManager["AppUserPinByLoginPwdCache"].getCache(inputkey); // var result = await cacheManager["AppUserPinByLoginPwdCache"].getCache(inputkey);
if (result && result.status == 0) { // if (result && result.status == 0) {
return system.getResultFail(system.reDoLoginFail, "请勿重复登录", { userpin: result.data.userpin || "" }); // return system.getResultFail(system.reDoLoginFail, "请勿重复登录", { userpin: result.data.userpin || "" });
} // }
result = await cacheManager["AppUserPinByLoginPwdCache"].cache(inputkey, pobj, system.shortExTime); var result = await cacheManager["AppUserPinByLoginPwdCache"].cache(inputkey, pobj, system.shortExTime);
if (result && result.status == 0) { if (result && result.status == 0) {
var userpinKey = this.getUserPinKey(pobj.actionBody.userpin); var userpinKey = this.getUserPinKey(pobj.actionBody.userpin);
this.redisClient.setWithEx(userpinKey, JSON.stringify(result), system.exTime); this.redisClient.setWithEx(userpinKey, JSON.stringify(result), system.exTime);
...@@ -306,13 +306,13 @@ class OpPlatformUtils { ...@@ -306,13 +306,13 @@ class OpPlatformUtils {
async getReqUserPinByLgoinVcode(pobj) { async getReqUserPinByLgoinVcode(pobj) {
var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile; var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile;
var cacheManager = system.getObject("db.common.cacheManager"); var cacheManager = system.getObject("db.common.cacheManager");
if (pobj.actionBody.reqType != "reg") { // if (pobj.actionBody.reqType != "reg") {
var result = await cacheManager["AppUserPinByLoginVcodeCache"].getCache(inputkey); // var result = await cacheManager["AppUserPinByLoginVcodeCache"].getCache(inputkey);
if (result && result.status == 0) { // if (result && result.status == 0) {
return system.getResultFail(system.reDoLoginFail, "请勿重复登录", { userpin: result.data.userpin || "" }); // return system.getResultFail(system.reDoLoginFail, "请勿重复登录", { userpin: result.data.userpin || "" });
} // }
} // }
result = await cacheManager["AppUserPinByLoginVcodeCache"].cache(inputkey, pobj, system.shortExTime); var result = await cacheManager["AppUserPinByLoginVcodeCache"].cache(inputkey, pobj, system.shortExTime);
if (result && result.status == 0 && pobj.actionBody.reqType != "reg") { if (result && result.status == 0 && pobj.actionBody.reqType != "reg") {
var userpinKey = this.getUserPinKey(pobj.actionBody.userpin); var userpinKey = this.getUserPinKey(pobj.actionBody.userpin);
this.redisClient.setWithEx(userpinKey, JSON.stringify(result), system.exTime); this.redisClient.setWithEx(userpinKey, JSON.stringify(result), system.exTime);
......
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