ScanResultScreen.js 916 B

123456789101112131415161718192021222324252627282930313233343536
  1. import React, {Component} from 'react';
  2. import CommonTitleBar from '../views/CommonTitleBar';
  3. import Global from '../utils/Global';
  4. import {StyleSheet, Text, View} from 'react-native';
  5. export default class ScanResultScreen extends Component {
  6. render() {
  7. console.log(this.props.navigation.state.params);
  8. return (
  9. <View style={styles.container}>
  10. <CommonTitleBar title={"扫码结果"} nav={this.props.navigation}/>
  11. <View style={styles.content}>
  12. <Text style={styles.resultText}>{this.props.navigation.state.params.resultText}</Text>
  13. </View>
  14. </View>
  15. );
  16. }
  17. }
  18. const styles = StyleSheet.create({
  19. container: {
  20. flex: 1,
  21. flexDirection: 'column',
  22. },
  23. content: {
  24. flex: 1,
  25. flexDirection: 'column',
  26. },
  27. resultText: {
  28. fontSize: 16,
  29. color: Global.titleBackgroundColor,
  30. marginLeft: 10,
  31. marginTop: 10,
  32. marginRight: 10,
  33. }
  34. });