!function(t){const e=t("#captcha"),n=t("#wait"),i=t("#btn");var c=function(n){n.onReady((function(){t("#wait").hide(300),n.verify()})),n.onSuccess((function(){t.post("validate/"+e.attr("key"),n.getValidate(),"json"),i.hide(300),e.append("<h2>\u9a8c\u8bc1\u6210\u529f\uff01</h2>")})),n.onClose((function(){e.attr("open","1"),i.show(300)&&i.click((()=>n.verify()))})),n.onError((function(){}))};i.click((function(){e.attr("open")||(t(this).hide(300),n.show(300),t.ajax({url:"register/"+e.attr("key"),type:"get",dataType:"json",success:function(n){n.message?(alert(n.message),e.hide(300)):(n.uid&&t("h1").text(`UID: ${n.uid}`),initGeetest({gt:n.gt,challenge:n.challenge,new_captcha:n.new_captcha||1,offline:!n.success||0,product:"bind",width:"100%"},c))}}))}))}(jQuery); |