Git Product home page Git Product logo

Comments (9)

xlsdg avatar xlsdg commented on June 9, 2024

打印一下 onErrorarguments 不就知道了么?参考 https://docs.geetest.com/install/deploy/client/web#onError-callback

from react-geetest.

xgj1988 avatar xgj1988 commented on June 9, 2024

@xlsdg 我的问题也是一样,如何重置 验证器。。拿不到 geetest对象撒 http://docs.geetest.com/install/deploy/client/web#reset

from react-geetest.

xgj1988 avatar xgj1988 commented on June 9, 2024

@xlsdg 我不是验证失败,可能是用户名输出了之类的。

from react-geetest.

xgj1988 avatar xgj1988 commented on June 9, 2024

@rainbowMorelhahahah 你搞定了吗?

from react-geetest.

xlsdg avatar xlsdg commented on June 9, 2024

稍等,我看一下。

from react-geetest.

xlsdg avatar xlsdg commented on June 9, 2024

@xgj1988 [email protected] 版本发布了,onReadyonErroronClose 都带了 Geetest 实例参数。

from react-geetest.

xgj1988 avatar xgj1988 commented on June 9, 2024

@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.

xlsdg avatar xlsdg commented on June 9, 2024
<Geetest
  gt="your-gt"
  challenge="your-challenge"
  onSuccess={onSuccess}
/>

onSuccess 事件的第一个参数可以拿到校验结果,然后请求后端接口判断是否正确。第二个参数是 Geetest 实例,如果错误就调用实例的 reset 方法重置。

from react-geetest.

xgj1988 avatar xgj1988 commented on June 9, 2024

@xlsdg 明白了。谢谢

from react-geetest.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.