Authored by 陈峰

验证码图片质量优化

@@ -30,7 +30,7 @@ exports.get = (req, res, next) => { @@ -30,7 +30,7 @@ exports.get = (req, res, next) => {
30 30
31 exports.imgCheck = (req, res, next) => { 31 exports.imgCheck = (req, res, next) => {
32 if (req.session.captchaSrc) { 32 if (req.session.captchaSrc) {
33 - return request(`${req.session.captchaSrc}?watermark/2/text/${uuid.v4()}/fontsize/120/dissolve/10/format/jpg`) 33 + return request(`${req.session.captchaSrc}?imageView2/0/format/jpg/q/70|watermark/2/text/${uuid.v4()}/fontsize/120/dissolve/10`)
34 .pipe(res); 34 .pipe(res);
35 } 35 }
36 return next(); 36 return next();