loan.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import React, {Component} from 'react';
  2. import {
  3. View,
  4. Text,
  5. SafeAreaView,
  6. ScrollView,
  7. Image,
  8. Dimensions,
  9. TouchableOpacity,
  10. } from 'react-native';
  11. import public_css from '../../../source/css/public_css';
  12. export default class loan extends Component {
  13. constructor(props) {
  14. super(props);
  15. this.props.navigation.dangerouslyGetParent().setOptions({
  16. tabBarVisible: false,
  17. });
  18. this.state = {
  19. listData: [],
  20. showFoot: 0, // 控制foot, 0:隐藏footer 1:已加载完成,没有更多数据 2 :显示加载中
  21. isLoading: false,
  22. };
  23. }
  24. render() {
  25. return (
  26. <SafeAreaView style={public_css.body}>
  27. <ScrollView>
  28. <View style={{alignItems: 'center'}}>
  29. <View>
  30. <Image
  31. style={{width: Dimensions.get('window').width, height: 360}}
  32. resizeMode={'stretch'}
  33. source={require('../../../source/img/homeImg/loan1.png')}
  34. />
  35. </View>
  36. <View
  37. style={{
  38. position: 'absolute',
  39. top: 330,
  40. }}>
  41. <TouchableOpacity
  42. style={{
  43. height: 40,
  44. width: 180,
  45. backgroundColor: '#FFE95F',
  46. justifyContent: 'center',
  47. alignItems: 'center',
  48. borderRadius: 64,
  49. elevation: 20, // 适配android的
  50. shadowOffset: {width: 0, height: 0},
  51. shadowColor: 'black',
  52. shadowOpacity: 0.15,
  53. shadowRadius: 5,
  54. }}
  55. onPress={() => {
  56. this.props.navigation.navigate('loan_apply');
  57. }}>
  58. <Text
  59. style={{color: '#CD0014', fontSize: 16, fontWeight: 'bold'}}>
  60. 立即申请
  61. </Text>
  62. </TouchableOpacity>
  63. </View>
  64. <Image
  65. style={{width: Dimensions.get('window').width, height: 450}}
  66. resizeMode={'stretch'}
  67. source={require('../../../source/img/homeImg/loan2.png')}
  68. />
  69. <Image
  70. style={{width: Dimensions.get('window').width, height: 700}}
  71. resizeMode={'stretch'}
  72. source={require('../../../source/img/homeImg/loan3.png')}
  73. />
  74. <View
  75. style={{
  76. position: 'relative',
  77. top: -120,
  78. zIndex: 1,
  79. }}>
  80. <TouchableOpacity
  81. style={{
  82. height: 40,
  83. width: 180,
  84. backgroundColor: '#FFE95F',
  85. justifyContent: 'center',
  86. alignItems: 'center',
  87. borderRadius: 64,
  88. elevation: 20, // 适配android的
  89. shadowOffset: {width: 0, height: 0},
  90. shadowColor: 'black',
  91. shadowOpacity: 0.15,
  92. shadowRadius: 5,
  93. }}
  94. onPress={() => {
  95. this.props.navigation.navigate('loan_apply');
  96. }}>
  97. <Text
  98. style={{color: '#CD0014', fontSize: 16, fontWeight: 'bold'}}>
  99. 立即申请
  100. </Text>
  101. </TouchableOpacity>
  102. </View>
  103. </View>
  104. </ScrollView>
  105. </SafeAreaView>
  106. );
  107. }
  108. }