Skip to content

Commit 479b1b5

Browse files
committed
demo 示例优化
1 parent 667d7e7 commit 479b1b5

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

example/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export default class App extends React.Component {
292292
if(Platform.OS == 'android'){
293293
JVerification.addLoginCustomConfig(customUIWithConfigAndroid, customViewParams);
294294
} else {
295-
JVerification.addLoginCustomConfig(customUIWithConfigiOS, []);
295+
JVerification.addLoginCustomConfig(customUIWithConfigiOS, customViewParams);
296296
}
297297
}}/>
298298

example/CustomView1.js

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2-
import {StyleSheet, Text, View,Alert, TouchableHighlight} from 'react-native';
2+
import {StyleSheet, Text, View,Alert,Image, TouchableHighlight} from 'react-native';
3+
import JVerification from 'jverification-react-native';
34

45
export default class CustomView1 extends React.Component {
56
createAlert = (title) =>
@@ -14,14 +15,28 @@ export default class CustomView1 extends React.Component {
1415

1516

1617
render() {
17-
return (
18-
<View style={styles.container}>
19-
<Button title="this is CustomView1"
20-
onPress={() =>
21-
this.createAlert("CustomView1 onClicked")
22-
}/>
23-
</View>
24-
);
18+
19+
return (
20+
<View>
21+
<TouchableHighlight onPress={() =>{
22+
// this.createAlert("CustomView1 onClicked")
23+
JVerification.dismissLoginPage()
24+
}}>
25+
<Image
26+
source={{uri: "https://reactnative.dev/docs/assets/p_cat1.png"}}
27+
style={{width: 50, height: 50}}
28+
/>
29+
</TouchableHighlight>
30+
</View>
31+
);
32+
// return (
33+
// <View style={styles.container}>
34+
// <Button title="this is CustomView1"
35+
// onPress={() =>
36+
// this.createAlert("CustomView1 onClicked")
37+
// }/>
38+
// </View>
39+
// );
2540
}
2641
}
2742

example/img/my_icon.jpg

1.14 MB
Loading

0 commit comments

Comments
 (0)