|
@@ -23,6 +23,12 @@ const check = (req, res, next) => { |
|
@@ -23,6 +23,12 @@ const check = (req, res, next) => { |
23
|
// 使用极验证
|
23
|
// 使用极验证
|
24
|
let useGeetest = !_.get(req.app.locals.wap, 'geetest.validation', false);
|
24
|
let useGeetest = !_.get(req.app.locals.wap, 'geetest.validation', false);
|
25
|
|
25
|
|
|
|
26
|
+ // 某次请求极验证调用注册失败,强制使用自有图形验证码
|
|
|
27
|
+ if (req.session.useYohoCaptcha) {
|
|
|
28
|
+ useGeetest = false;
|
|
|
29
|
+ req.session.useYohoCaptcha = false;
|
|
|
30
|
+ }
|
|
|
31
|
+
|
26
|
return (useGeetest ? geetest : captcha).validate(req, res, next);
|
32
|
return (useGeetest ? geetest : captcha).validate(req, res, next);
|
27
|
};
|
33
|
};
|
28
|
|
34
|
|