robot-check.page.js
509 Bytes
var $ = require('yoho-jquery'),
Captcha = require('../plugins/captcha');
var captcha = new Captcha('.captcha-wrap', {
checkURI: '/3party/check',
initURI: '/3party/captcha.png',
page: 'robot'
}).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');
});