Comments (9)
打印一下 onError
的 arguments
不就知道了么?参考 https://docs.geetest.com/install/deploy/client/web#onError-callback
from react-geetest.
@xlsdg 我的问题也是一样,如何重置 验证器。。拿不到 geetest对象撒 http://docs.geetest.com/install/deploy/client/web#reset
from react-geetest.
@xlsdg 我不是验证失败,可能是用户名输出了之类的。
from react-geetest.
@rainbowMorelhahahah 你搞定了吗?
from react-geetest.
稍等,我看一下。
from react-geetest.
@xgj1988 [email protected]
版本发布了,onReady
、onError
、onClose
都带了 Geetest
实例参数。
from react-geetest.
@xlsdg 嗯。。怎么触发onError 呢??我的代码是这样的
this.props.dispatch({
type: 'systemLogin/login',
payload: {
...values,
...this.geetestSuccessInfo,
userId: this.userId,
type
},
callback: (data) => {
if (data.success) {
LoginUser.login(data);
this.props.history.push(LoginUser.getWelcomeUrl());
}
}
});
在callback的时候如果success是false 那么就要重置撒
from react-geetest.
<Geetest
gt="your-gt"
challenge="your-challenge"
onSuccess={onSuccess}
/>
onSuccess
事件的第一个参数可以拿到校验结果,然后请求后端接口判断是否正确。第二个参数是 Geetest
实例,如果错误就调用实例的 reset
方法重置。
from react-geetest.
@xlsdg 明白了。谢谢
from react-geetest.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-geetest.