robot-check.page.js 454 Bytes
var $ = require('yoho-jquery'),
    Captcha = require('../plugins/captcha');

var captcha = new Captcha('.captcha-wrap', {
    checkURI: '/3party/check'
}).init();

require('../common');
require('../common/promise');

$('.confirm').on('click', function() {
    captcha.check().then(function() {
        window.jumpUrl(window.queryString().refer || '//www.yohobuy.com');
    });
});

captcha.onSuccess(function() {
    $('.confirm').trigger('click');
});