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