Merge branch 'hotfix/1223' into 'master'
默认登录验证码为极验证 去掉超级密码 See merge request !206
Showing
3 changed files
with
6 additions
and
6 deletions
@@ -11,7 +11,7 @@ const {CAPTCHA_SWITCH, CAPTCHA_TYPE} = require('../models/captcha-type'); | @@ -11,7 +11,7 @@ const {CAPTCHA_SWITCH, CAPTCHA_TYPE} = require('../models/captcha-type'); | ||
11 | 11 | ||
12 | 12 | ||
13 | const isGeetest = (req) => { | 13 | const isGeetest = (req) => { |
14 | - return _.get(req.session, 'captcha.type', '') === CAPTCHA_TYPE.geetest; | 14 | + return _.get(req.session, 'captcha.type', 'geetest') === CAPTCHA_TYPE.geetest; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | function required(req, res, next) { | 17 | function required(req, res, next) { |
@@ -9,11 +9,12 @@ const Geetest = require('../models/captcha-gee-service'); | @@ -9,11 +9,12 @@ const Geetest = require('../models/captcha-gee-service'); | ||
9 | 9 | ||
10 | const config = global.yoho.config; | 10 | const config = global.yoho.config; |
11 | const logger = global.yoho.logger; | 11 | const logger = global.yoho.logger; |
12 | -const CAPTCHA = config.UNIVERSAL_CAPTCHA; | 12 | + |
13 | +// const CAPTCHA = config.UNIVERSAL_CAPTCHA; | ||
13 | 14 | ||
14 | // 对比函数 | 15 | // 对比函数 |
15 | -const _mustEqual = (req) => { | ||
16 | - return req.body.verifyCode === CAPTCHA; | 16 | +const _mustEqual = () => { |
17 | + return false; | ||
17 | }; | 18 | }; |
18 | 19 | ||
19 | var pcGeetest = new Geetest({ | 20 | var pcGeetest = new Geetest({ |
@@ -26,8 +26,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -26,8 +26,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
26 | } | 26 | } |
27 | 27 | ||
28 | check(id, captcha) { | 28 | check(id, captcha) { |
29 | - return this._checkUniverse(captcha) | ||
30 | - .catch(() => this.api.check(id, captcha)) | 29 | + return this.api.check(id, captcha) |
31 | .then((result) => { | 30 | .then((result) => { |
32 | logger.info(`app.verified.graphic [${captcha}] result: `, JSON.stringify(result)); | 31 | logger.info(`app.verified.graphic [${captcha}] result: `, JSON.stringify(result)); |
33 | return result; | 32 | return result; |
-
Please register or login to post a comment