...
|
...
|
@@ -49,10 +49,14 @@ module.exports = function(req, res, next) { |
|
|
captchaReq.from_json_string(JSON.stringify(params));
|
|
|
|
|
|
// eslint-disable-next-line new-cap
|
|
|
client.DescribeCaptchaResult(captchaReq, function(errMsg) {
|
|
|
client.DescribeCaptchaResult(captchaReq, function(errMsg, response) {
|
|
|
if (errMsg) {
|
|
|
return res.jsonp({code: 400, message: errMsg.Message});
|
|
|
}
|
|
|
|
|
|
if (response.CaptchaCode !== 1) {
|
|
|
return res.jsonp({ code: 400, message: '验证码错误'});
|
|
|
}
|
|
|
next();
|
|
|
});
|
|
|
} else {
|
...
|
...
|
|