Authored by htoooth

check captcha

var $ = require('yoho-jquery'),
Captcha = require('../plugins/captcha');
var captcha = new Captcha('.captcha-wrap', {
checkURI: '/3party/check'
}).init();
... ...
var $ = require('yoho-jquery');
require('../../common/promise');
exports.check = function(captcha) {
return $.post('/3party/check', {
verifyCode: captcha
}).then(function(result) {
if (result.code !== 200) {
} else {
}
});
};