react-aliyun-human-verify
阿里云机器人验证组件
参数和 API
相关
示例
import { AliyunHumanVerify } from '@km.js/react-aliyun-human-verify';
class MyComp extends React.Component {
render() {
return (
<div>
<AliyunHumanVerify
appkey="XXXXXXXXX0000000000"
scene="ic_login"
onSuccess={() => this.onSuccess()}
onLoaded={(ref) => (this.cc = ref)}
onFailed={() => this.onFailed()}
/>
<button onClick={this.cc.reset()}>RESET</button>
</div>
);
}
onSuccess(data) {
// do anything you want
}
onFailed() {
alert('江南皮革厂倒闭了!');
}
}