...
|
...
|
@@ -5,6 +5,7 @@ |
|
|
'use strict';
|
|
|
|
|
|
const api = require('./captcha-api');
|
|
|
const uuid = require('uuid');
|
|
|
|
|
|
exports.generateCaptcha = () => {
|
|
|
return api.gen().then((result) => {
|
...
|
...
|
@@ -17,7 +18,8 @@ exports.generateCaptcha = () => { |
|
|
code: 200,
|
|
|
data: {
|
|
|
text: codeStr,
|
|
|
images: `${result.data.verifiedGraphicCode}?imageView/2/w/240`
|
|
|
images: `${result.data.verifiedGraphicCode}` +
|
|
|
`?imageView/2/w/240/watermark/2/text/${uuid.v4()}/fontsize/120/dissolve/10`
|
|
|
}
|
|
|
};
|
|
|
} else {
|
...
|
...
|
|