Authored by ccbikai(👎🏻🍜)

登录失败写入缓存

... ... @@ -14,6 +14,8 @@ const cookie = global.yoho.cookie;
const helpers = global.yoho.helpers;
const log = global.yoho.logger;
const config = global.yoho.config;
const cache = global.yoho.cache;
const logger = global.yoho.logger;
const utils = require(global.utils);
const RegService = require('../models/reg-service');
const AuthHelper = require('../models/auth-helper');
... ... @@ -211,6 +213,8 @@ const local = {
captchaShow: true
};
cache.set(`loginErrorIp:${req.yoho.clientIp}`, true, 3600).catch(logger.error);
res.json(obj);
} else {
let refer = req.cookies.refer;
... ...