Authored by htoooth

check captcha

1 var $ = require('yoho-jquery'), 1 var $ = require('yoho-jquery'),
2 Captcha = require('../plugins/captcha'); 2 Captcha = require('../plugins/captcha');
  3 +
3 var captcha = new Captcha('.captcha-wrap', { 4 var captcha = new Captcha('.captcha-wrap', {
4 checkURI: '/3party/check' 5 checkURI: '/3party/check'
5 }).init(); 6 }).init();
1 -  
2 -var $ = require('yoho-jquery');  
3 -  
4 -require('../../common/promise');  
5 -  
6 -exports.check = function(captcha) {  
7 - return $.post('/3party/check', {  
8 - verifyCode: captcha  
9 - }).then(function(result) {  
10 - if (result.code !== 200) {  
11 -  
12 - } else {  
13 -  
14 - }  
15 - });  
16 -};