|
var handler = function (captchaObj) { |
|
captchaObj.appendTo('#captcha'); |
|
captchaObj.onReady(function () { |
|
$("#wait").hide(); |
|
}); |
|
$("#done").click(function () { |
|
var result = captchaObj.getValidate(); |
|
if (!result) { |
|
alert("请完成验证"); |
|
} |
|
else { |
|
var validate = result.geetest_validate; |
|
var seccode = result.geetest_seccode; |
|
window.location.href = window.location.href + "result/validate=" + validate + "&seccode=" + seccode; |
|
} |
|
}); |
|
|
|
}; |
|
$('#wait').show(); |
|
|
|
|
|
|
|
initGeetest({ |
|
|
|
gt: { Python_Interface: GT }, |
|
challenge: { Python_Interface: CHALLENGE }, |
|
offline: false, |
|
new_captcha: true, |
|
|
|
product: "popup", |
|
width: "300px", |
|
https: true |
|
|
|
|
|
}, handler); |
|
|