Authored by 陈峰

默认登录验证码为极验证 去掉超级密码

... ... @@ -11,7 +11,7 @@ const {CAPTCHA_SWITCH, CAPTCHA_TYPE} = require('../models/captcha-type');
const isGeetest = (req) => {
return _.get(req.session, 'captcha.type', '') === CAPTCHA_TYPE.geetest;
return _.get(req.session, 'captcha.type', 'geetest') === CAPTCHA_TYPE.geetest;
};
function required(req, res, next) {
... ...
... ... @@ -9,11 +9,12 @@ const Geetest = require('../models/captcha-gee-service');
const config = global.yoho.config;
const logger = global.yoho.logger;
const CAPTCHA = config.UNIVERSAL_CAPTCHA;
// const CAPTCHA = config.UNIVERSAL_CAPTCHA;
// 对比函数
const _mustEqual = (req) => {
return req.body.verifyCode === CAPTCHA;
const _mustEqual = () => {
return false;
};
var pcGeetest = new Geetest({
... ...
... ... @@ -26,8 +26,7 @@ module.exports = class extends global.yoho.BaseModel {
}
check(id, captcha) {
return this._checkUniverse(captcha)
.catch(() => this.api.check(id, captcha))
return this.api.check(id, captcha)
.then((result) => {
logger.info(`app.verified.graphic [${captcha}] result: `, JSON.stringify(result));
return result;
... ...