-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
61 lines (55 loc) · 1.32 KB
/
App.js
File metadata and controls
61 lines (55 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
*
* @format
* @flow
*/
import React, { Component } from 'react';
// import {
// Text,
// Button,
// View,
// } from 'react-native';
// import { CaptchaModule } from './src/nativeModules';
import RootStack from './src/router';
export default class App extends Component {
render() {
return <RootStack />;
}
}
// export default class App extends Component {
// constructor(props) {
// super(props);
// this.state = {
// captchaData: '',
// };
// }
// render() {
// const onPressCaptcha = async () => {
// try {
// const appId = '2073347220';
// const res = await CaptchaModule.showCaptcha(appId);
// this.setState({
// captchaData: JSON.stringify(res),
// });
// if (res.ret === 0) {
// alert("验证通过");
// }
// } catch(e) {
// alert(`验证发生异常, error=${e.message}`);
// }
// }
// return (
// <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
// <Text>验证返回值:</Text>
// <Text>{this.state.captchaData}</Text>
// <Button
// title="提 交"
// onPress={onPressCaptcha}
// />
// </View>
// )
// }
// }