Commit add46076 by 宋毅

tj

parent d854753d
...@@ -341,7 +341,7 @@ class OpPlatformUtils { ...@@ -341,7 +341,7 @@ 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"); let 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 || "" });
...@@ -357,9 +357,9 @@ class OpPlatformUtils { ...@@ -357,9 +357,9 @@ class OpPlatformUtils {
* @param {*} pobj pobj.actionBody:{mobile:XXX,vcode:XXX,reqType:"reg",password:XXX-reqType为reg时有此值} * @param {*} pobj pobj.actionBody:{mobile:XXX,vcode:XXX,reqType:"reg",password:XXX-reqType为reg时有此值}
*/ */
async getReqUserPinByLgoinVcode(pobj) { async getReqUserPinByLgoinVcode(pobj) {
var cacheManager = system.getObject("db.common.cacheManager"); let cacheManager = system.getObject("db.common.cacheManager");
var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile; var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile;
var cacheCode = await this.cacheManager["VCodeCache"].getCache(inputkey); var cacheCode = await cacheManager["VCodeCache"].getCache(inputkey);
if (!cacheCode || pobj.vcode != cacheCode.vcode) { if (!cacheCode || pobj.vcode != cacheCode.vcode) {
return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail); return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail);
} }
...@@ -404,8 +404,9 @@ class OpPlatformUtils { ...@@ -404,8 +404,9 @@ class OpPlatformUtils {
if (!pobj.appInfo) { if (!pobj.appInfo) {
return system.getResult(null, "pobj.appInfo can not be empty !"); return system.getResult(null, "pobj.appInfo can not be empty !");
} }
let cacheManager = system.getObject("db.common.cacheManager");
var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile; var inputkey = pobj.appInfo.uapp_key + "_" + pobj.actionBody.mobile;
var cacheCode = await this.cacheManager["VCodeCache"].getCache(inputkey); var cacheCode = await cacheManager["VCodeCache"].getCache(inputkey);
if (!cacheCode || pobj.vcode != cacheCode.vcode) { if (!cacheCode || pobj.vcode != cacheCode.vcode) {
return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail); return system.getResultFail(system.verifyVCodeFail, "验证码校验不成功,请重新获取验证码验证.", system.verifyVCodeFail);
} }
......
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