MyInfo.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. import React, { Component } from "react"
  2. import { StyleSheet, View, Text, Image } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import RNPickerSelect from 'react-native-picker-select';
  5. import AntDesign from "react-native-vector-icons/AntDesign"
  6. export default class MyInfo extends Component {
  7. render() {
  8. return (
  9. <View style={styles.container}>
  10. <View style={styles.titleTip}>
  11. <AntDesign
  12. name={"pay-circle1"}
  13. size={20}
  14. style={{ color: "#FA788A", marginRight: unitWidth * 12 }}
  15. />
  16. <Text style={{ color: "#FA788A", fontSize: unitWidth * 28 }}>完成10项资料后,你才会被系统推荐给他人</Text>
  17. </View>
  18. <View style={styles.formArea}>
  19. <View style={styles.formItem}>
  20. <RNPickerSelect
  21. placeholder={""}
  22. onValueChange={(value) => console.log(value)}
  23. items={[
  24. { label: 'Football', value: 'football' },
  25. { label: 'Baseball', value: 'baseball' },
  26. { label: 'Hockey', value: 'hockey' },
  27. ]}
  28. >
  29. <View style={styles.itemArea}>
  30. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>头像</Text>
  31. <View style={styles.itemRight}>
  32. <Image
  33. source={require("../../static/userPhone.png")}
  34. style={styles.userIcon}
  35. />
  36. <AntDesign
  37. name={"right"}
  38. size={20}
  39. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  40. />
  41. </View>
  42. </View>
  43. </RNPickerSelect>
  44. </View>
  45. <View style={styles.formItem}>
  46. <RNPickerSelect
  47. placeholder={""}
  48. onValueChange={(value) => console.log(value)}
  49. items={[
  50. { label: 'Football', value: 'football' },
  51. { label: 'Baseball', value: 'baseball' },
  52. { label: 'Hockey', value: 'hockey' },
  53. ]}
  54. >
  55. <View style={styles.itemArea}>
  56. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>姓名</Text>
  57. <View style={styles.itemRight}>
  58. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>张晓明</Text>
  59. <AntDesign
  60. name={"right"}
  61. size={20}
  62. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  63. />
  64. </View>
  65. </View>
  66. </RNPickerSelect>
  67. </View>
  68. <View style={styles.formItem}>
  69. <RNPickerSelect
  70. placeholder={""}
  71. onValueChange={(value) => console.log(value)}
  72. items={[
  73. { label: 'Football', value: 'football' },
  74. { label: 'Baseball', value: 'baseball' },
  75. { label: 'Hockey', value: 'hockey' },
  76. ]}
  77. >
  78. <View style={styles.itemArea}>
  79. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>性别</Text>
  80. <View style={styles.itemRight}>
  81. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>女</Text>
  82. <AntDesign
  83. name={"right"}
  84. size={20}
  85. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  86. />
  87. </View>
  88. </View>
  89. </RNPickerSelect>
  90. </View>
  91. <View style={styles.formItem}>
  92. <RNPickerSelect
  93. placeholder={""}
  94. onValueChange={(value) => console.log(value)}
  95. items={[
  96. { label: 'Football', value: 'football' },
  97. { label: 'Baseball', value: 'baseball' },
  98. { label: 'Hockey', value: 'hockey' },
  99. ]}
  100. >
  101. <View style={styles.itemArea}>
  102. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>出生日期</Text>
  103. <View style={styles.itemRight}>
  104. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>1990-01-01</Text>
  105. <AntDesign
  106. name={"right"}
  107. size={20}
  108. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  109. />
  110. </View>
  111. </View>
  112. </RNPickerSelect>
  113. </View>
  114. <View style={styles.formItem}>
  115. <RNPickerSelect
  116. placeholder={""}
  117. onValueChange={(value) => console.log(value)}
  118. items={[
  119. { label: 'Football', value: 'football' },
  120. { label: 'Baseball', value: 'baseball' },
  121. { label: 'Hockey', value: 'hockey' },
  122. ]}
  123. >
  124. <View style={styles.itemArea}>
  125. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>居住地</Text>
  126. <View style={styles.itemRight}>
  127. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>山东省烟台市莱山区</Text>
  128. <AntDesign
  129. name={"right"}
  130. size={20}
  131. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  132. />
  133. </View>
  134. </View>
  135. </RNPickerSelect>
  136. </View>
  137. <View style={styles.formItem}>
  138. <RNPickerSelect
  139. placeholder={""}
  140. onValueChange={(value) => console.log(value)}
  141. items={[
  142. { label: 'Football', value: 'football' },
  143. { label: 'Baseball', value: 'baseball' },
  144. { label: 'Hockey', value: 'hockey' },
  145. ]}
  146. >
  147. <View style={styles.itemArea}>
  148. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>身高</Text>
  149. <View style={styles.itemRight}>
  150. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>170cm</Text>
  151. <AntDesign
  152. name={"right"}
  153. size={20}
  154. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  155. />
  156. </View>
  157. </View>
  158. </RNPickerSelect>
  159. </View>
  160. <View style={styles.formItem}>
  161. <RNPickerSelect
  162. placeholder={""}
  163. onValueChange={(value) => console.log(value)}
  164. items={[
  165. { label: 'Football', value: 'football' },
  166. { label: 'Baseball', value: 'baseball' },
  167. { label: 'Hockey', value: 'hockey' },
  168. ]}
  169. >
  170. <View style={styles.itemArea}>
  171. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>体重</Text>
  172. <View style={styles.itemRight}>
  173. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>55kg</Text>
  174. <AntDesign
  175. name={"right"}
  176. size={20}
  177. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  178. />
  179. </View>
  180. </View>
  181. </RNPickerSelect>
  182. </View>
  183. <View style={styles.formItem}>
  184. <RNPickerSelect
  185. placeholder={""}
  186. onValueChange={(value) => console.log(value)}
  187. items={[
  188. { label: 'Football', value: 'football' },
  189. { label: 'Baseball', value: 'baseball' },
  190. { label: 'Hockey', value: 'hockey' },
  191. ]}
  192. >
  193. <View style={styles.itemArea}>
  194. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>行业</Text>
  195. <View style={styles.itemRight}>
  196. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>互联网行业</Text>
  197. <AntDesign
  198. name={"right"}
  199. size={20}
  200. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  201. />
  202. </View>
  203. </View>
  204. </RNPickerSelect>
  205. </View>
  206. <View style={styles.formItem}>
  207. <RNPickerSelect
  208. placeholder={""}
  209. onValueChange={(value) => console.log(value)}
  210. items={[
  211. { label: 'Football', value: 'football' },
  212. { label: 'Baseball', value: 'baseball' },
  213. { label: 'Hockey', value: 'hockey' },
  214. ]}
  215. >
  216. <View style={styles.itemArea}>
  217. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>年收入</Text>
  218. <View style={styles.itemRight}>
  219. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>15-20w</Text>
  220. <AntDesign
  221. name={"right"}
  222. size={20}
  223. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  224. />
  225. </View>
  226. </View>
  227. </RNPickerSelect>
  228. </View>
  229. <View style={styles.formItem}>
  230. <RNPickerSelect
  231. placeholder={""}
  232. onValueChange={(value) => console.log(value)}
  233. items={[
  234. { label: 'Football', value: 'football' },
  235. { label: 'Baseball', value: 'baseball' },
  236. { label: 'Hockey', value: 'hockey' },
  237. ]}
  238. >
  239. <View style={styles.itemArea}>
  240. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>兴趣爱好</Text>
  241. <View style={styles.itemRight}>
  242. <Text style={{ color: "#333333", marginLeft: unitWidth * 28 }}>it</Text>
  243. <AntDesign
  244. name={"right"}
  245. size={20}
  246. style={{ color: "#999999", marginLeft: unitWidth * 22 }}
  247. />
  248. </View>
  249. </View>
  250. </RNPickerSelect>
  251. </View>
  252. </View>
  253. </View>
  254. )
  255. }
  256. }
  257. const styles = StyleSheet.create({
  258. container: {
  259. flex: 1,
  260. alignItems: "center"
  261. },
  262. titleTip: {
  263. width: "100%",
  264. height: unitHeight * 84,
  265. backgroundColor: "#FCF2F6",
  266. flexDirection:"row",
  267. alignItems:"center",
  268. paddingLeft:unitWidth * 24,
  269. },
  270. formArea: {
  271. width: "100%"
  272. },
  273. formItem: {
  274. width: "100%",
  275. height: unitHeight * 97,
  276. backgroundColor: "#fff",
  277. marginBottom: unitHeight * 6,
  278. },
  279. itemArea: {
  280. width: "100%",
  281. height: "100%",
  282. flexDirection: "row",
  283. justifyContent: "space-between",
  284. alignItems: "center",
  285. paddingLeft: unitWidth * 23,
  286. paddingRight: unitWidth * 24,
  287. borderBottomColor: "#F9F9F9",
  288. borderBottomWidth: 1
  289. },
  290. itemRight: {
  291. flexDirection: "row",
  292. alignItems: "center"
  293. },
  294. userIcon: {
  295. width: unitWidth * 66,
  296. height: unitHeight * 66
  297. }
  298. })