react-native-captcha
v1.0.1
Published
a plugin of yidun-captcha on react-native
Downloads
55
Readme
import React, {Component} from 'react'; import { View, Button } from 'react-native';
import {validate} from 'react-native-captcha'
const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', });
type Props = {}; export default class App extends Component { render() { return ( <Button title={'点击'} onPress={() => { validate("xxx码", (s) => { /** * s返回值格式 * { * result:true/false * message:'返回提示语' * validate:返回的验证码 * } * */ alert(s.validate) }); }}/> ); } }