Attestation.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. import React, { Component } from "react"
  2. import { StyleSheet, View } from "react-native"
  3. import { unitWidth, unitHeight } from "../../utils/AdapterUtil";
  4. import MyButtom from '../../component/MyButton'
  5. import Title from "./Title"
  6. import Icon from "./Icon"
  7. import Info from "./Info"
  8. import Select from "./Select"
  9. import IdSelect from "./IdSelect"
  10. import IdIcon from "./IdIcon"
  11. export default class Attestation extends Component {
  12. state = {
  13. pageStatus: 4,
  14. carTit: "请上传您的行驶证内页图片",
  15. carSubTit: "(您上传的照片资料仅作认证使用,并将被加密处理)",
  16. schoolTit: "请上传您的毕业证书、学位证书或学信网电子证明",
  17. schoolSubTit: "(您上传的照片资料仅作认证使用,并将被加密处理)",
  18. houseTit: "请上传房产证内页或购房合同内页(需露出署名)",
  19. houseSubTit: "(您上传的照片资料仅作认证使用,并将被加密处理)",
  20. workTit: "请选择以下任一材料上传,证明你的工作职业",
  21. idTit: "完成身份验证,信用值+10",
  22. }
  23. componentDidMount() {
  24. this.setState({
  25. pageStatus: this.props.navigation.state.params.status
  26. })
  27. }
  28. toWaitCheck = () => {
  29. const { navigation } = this.props;
  30. switch (this.state.pageStatus) {
  31. case 4:
  32. navigation.navigate("WaitAttestation",{status:2})
  33. break;
  34. case 3:
  35. navigation.navigate("WaitAttestation",{status:2})
  36. break;
  37. case 1:
  38. navigation.navigate("WaitAttestation",{status:2})
  39. break;
  40. }
  41. }
  42. render() {
  43. return (
  44. <View style={styles.container}>
  45. {
  46. this.state.pageStatus === 0 ? (<Title
  47. tit={this.state.carTit}
  48. subTit={this.state.carSubTit}
  49. />) : null
  50. }
  51. {
  52. this.state.pageStatus === 0 ? (<Icon
  53. IconList={["点击上传行驶证内页或者车辆购买证明"]}
  54. />) : null
  55. }
  56. {
  57. this.state.pageStatus === 0 ? (<Info
  58. infoList={["1、请保证拍摄图片清晰可辨。", "2、证书内页的印章完整清晰,请勿遮挡。"]}
  59. />) : null
  60. }
  61. {
  62. this.state.pageStatus === 1 ? (<Select />) : null
  63. }
  64. {
  65. this.state.pageStatus === 1 ? (<Title
  66. tit={this.state.schoolTit}
  67. subTit={this.state.schoolSubTit}
  68. />) : null
  69. }
  70. {
  71. this.state.pageStatus === 1 ? (<Icon
  72. IconList={["点击上传学历证书内页"]}
  73. />) : null
  74. }
  75. {
  76. this.state.pageStatus === 1 ? (<Info
  77. infoList={["1.请保证拍摄图片清晰可辨,证书中的印章完整清晰。", "2.证书中的证书编号、院校名称、学历类别、姓名等信息须完整清晰,请勿遮挡。"]}
  78. />) : null
  79. }
  80. {
  81. this.state.pageStatus === 2 ? (<Title
  82. tit={this.state.houseTit}
  83. subTit={this.state.houseSubTit}
  84. />) : null
  85. }
  86. {
  87. this.state.pageStatus === 2 ? (<Icon
  88. IconList={["点击上传带有产权拥有人和产权年限信息的内页图片"]}
  89. />) : null
  90. }
  91. {
  92. this.state.pageStatus === 2 ? (<Info
  93. infoList={["1.请保证拍摄图片清晰可辨,证书中的印章完整清晰。", "2.证书内页的产权拥有人和产权年限等信息须完整清晰,请勿遮挡。"]}
  94. />) : null
  95. }
  96. {
  97. this.state.pageStatus === 3 ? (<Title
  98. tit={this.state.workTit}
  99. subTit={""}
  100. />) : null
  101. }
  102. {
  103. this.state.pageStatus === 3 ? (<Icon
  104. IconList={["点击上传个人名片", "点击上传个人工牌", "点击上传在职证明"]}
  105. />) : null
  106. }
  107. {
  108. this.state.pageStatus === 3 ? (<Info
  109. infoList={["1、须手持纸质名片拍摄,确保姓名、公司、职位、手机号拍摄清晰,请勿遮挡。", "2、在职证明和个人工牌须确保公司、职位、姓名信息区域拍摄清晰,请勿遮挡。"]}
  110. />) : null
  111. }
  112. {
  113. this.state.pageStatus === 4 ? (<Title
  114. tit={this.state.idTit}
  115. subTit={""}
  116. />) : null
  117. }
  118. {
  119. this.state.pageStatus === 4 ? (<IdSelect />) : null
  120. }
  121. {
  122. this.state.pageStatus === 4 ? (<IdIcon
  123. IconList={["点击上传人像面", "点击上传国徽面"]}
  124. />) : null
  125. }
  126. {
  127. this.state.pageStatus === 4 ? (<Info
  128. infoList={["1、证件必须是清晰彩色原件电子版本,支持jpg、png、jpeg的图片格式。", "2、拍摄的证件必须无反光、无水印,身份证尽量充满图片,文字清晰可见。"]}
  129. />) : null
  130. }
  131. <View style={styles.bottomBtn}>
  132. <MyButtom
  133. onPress={this.toWaitCheck}
  134. text={"提交认证"}
  135. width={unitWidth * 502}
  136. height={unitHeight * 84}
  137. borderRadius={unitHeight * 84}
  138. bgColor="#FA788A"
  139. shadowBgc="rgba(250,120,138,1)"
  140. style={{ fontSize: unitWidth * 32 }}
  141. />
  142. </View>
  143. </View>
  144. )
  145. }
  146. }
  147. const styles = StyleSheet.create({
  148. container: {
  149. flex: 1,
  150. alignItems: "center",
  151. backgroundColor: "#fff"
  152. },
  153. bottomBtn: {
  154. width: "100%",
  155. height: unitHeight * 84,
  156. justifyContent: 'center',
  157. alignItems: 'center',
  158. position: "absolute",
  159. bottom: unitHeight * 138
  160. }
  161. })