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