robot-check.page.js
534 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');
});