fix: 修复 Geetest GT4 备用版本缺少 onClose 方法的错误

- 在 gt4.js 备用实现中添加 onClose 方法
- 避免 captcha.onClose is not a function 错误
- 保持与正式版 API 的兼容性
This commit is contained in:
2026-01-20 18:33:12 +08:00
parent dcaa19f5bc
commit e5f0acc20f

View File

@@ -29,6 +29,10 @@
onError: function(fn) { onError: function(fn) {
return this; return this;
}, },
onClose: function(fn) {
// 备用版本不支持关闭事件,但提供空实现避免错误
return this;
},
getValidate: function() { getValidate: function() {
return { return {
lot_number: 'fallback_' + Date.now(), lot_number: 'fallback_' + Date.now(),