修复极验的问题

This commit is contained in:
2025-11-28 10:59:58 +08:00
parent 7989c17cde
commit 7f57a4e816
9 changed files with 448 additions and 103 deletions
+7 -4
View File
@@ -69,7 +69,7 @@ $_SESSION['csrf_token'] = $csrf_token;
<script src="<?php echo $cdnpublic?>twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="<?php echo $cdnpublic?>layer/3.1.1/layer.min.js"></script>
<script src="<?php echo $cdnpublic?>jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script src="//static.geetest.com/static/tools/gt.js"></script>
<script src="https://static.geetest.com/static/js/gt.0.5.0.js"></script>
<script>
window.appendChildOrg = Element.prototype.appendChild;
Element.prototype.appendChild = function() {
@@ -199,6 +199,7 @@ $(document).ready(function(){
dataType: "json",
success: function (data) {
if(data.version == 1){
// 极验4.0初始化
initGeetest4({
captchaId: data.gt,
product: 'bind',
@@ -207,13 +208,15 @@ $(document).ready(function(){
hideSuccess: true,
}, handlerEmbed);
}else{
// 极验3.0初始化
initGeetest({
width: '100%',
gt: data.gt,
challenge: data.challenge,
new_captcha: data.new_captcha,
offline: !data.success,
new_captcha: true,
product: "bind",
offline: !data.success
api_server: 'api.geevisit.com', // 指定极验API域名
timeout: 10000 // 10秒超时
}, handlerEmbed);
}
}