userCard.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. import React from "react"
  2. import { StyleSheet, Text, View, Image, ScrollView, TouchableOpacity } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import Foundation from "react-native-vector-icons/Foundation"
  5. import FontAwesome5 from "react-native-vector-icons/FontAwesome5"
  6. import AntDesign from "react-native-vector-icons/AntDesign"
  7. import Tips from '../component/Tips'
  8. export default class UserCard extends React.Component {
  9. state = {
  10. pageStatus: 0
  11. };
  12. componentDidMount() {
  13. this.setState({
  14. pageStatus: this.props.navigation.state.params.status
  15. })
  16. }
  17. toCheckName = () => {
  18. const { navigation } = this.props;
  19. navigation.navigate("Attestation", { status: 4 })
  20. }
  21. toCheckWork = () => {
  22. const { navigation } = this.props;
  23. navigation.navigate("Attestation", { status: 3 })
  24. }
  25. toCheckSchool = () => {
  26. const { navigation } = this.props;
  27. navigation.navigate("Attestation", { status: 1 })
  28. }
  29. toCheckHouse = () => {
  30. const { navigation } = this.props;
  31. navigation.navigate("Attestation", { status: 2 })
  32. }
  33. toCheckCar = () => {
  34. const { navigation } = this.props;
  35. navigation.navigate("Attestation", { status: 0 })
  36. }
  37. toAttInfo = () => {
  38. const { navigation } = this.props;
  39. navigation.navigate("AttestationInfo")
  40. }
  41. toMyInfo = () => {
  42. const { navigation } = this.props;
  43. navigation.navigate("MyInfo")
  44. }
  45. toGirlFirend = () => {
  46. const { navigation } = this.props;
  47. navigation.navigate("GirlFrienfTerm")
  48. }
  49. toSetting = () => {
  50. const { navigation } = this.props;
  51. navigation.navigate("Setting")
  52. }
  53. toGift = () => {
  54. const { navigation } = this.props;
  55. navigation.navigate("MyGift")
  56. }
  57. render() {
  58. return (
  59. <ScrollView>
  60. <View style={styles.container}>
  61. <View style={styles.topBgc}>
  62. <TouchableOpacity onPress={this.toSetting}>
  63. <Image
  64. source={require("../../static/bannerBgc.png")}
  65. style={styles.bannerBgc}
  66. />
  67. </TouchableOpacity>
  68. <TouchableOpacity onPress={this.toMyInfo}>
  69. <View style={styles.userPhoneArea}>
  70. <Image
  71. source={require("../../static/userPhone.png")}
  72. style={styles.userPhone}
  73. />
  74. <View style={styles.maleIconArea}>
  75. <Foundation
  76. name={"male-symbol"}
  77. size={16}
  78. style={styles.maleIcon}
  79. />
  80. </View>
  81. </View>
  82. </TouchableOpacity>
  83. </View>
  84. <View style={styles.userTit}>
  85. <View style={styles.titRow}>
  86. <Text style={{ fontSize: unitWidth * 28, color: "#333333", marginRight: unitWidth * 28 }}>张晓明</Text>
  87. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>V3</Text>
  88. </View>
  89. <Text style={{ fontSize: unitWidth * 24, color: "#999999" }}>莱山区丨185cm丨55kg丨公务员丨15-20w丨本科</Text>
  90. <View style={styles.subtitRow}>
  91. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>你和张晓明的匹配度:</Text>
  92. <Text style={{ fontSize: unitWidth * 28, color: "#FA788A" }}>87%</Text>
  93. </View>
  94. <View style={styles.attestation}>
  95. <TouchableOpacity onPress={this.toAttInfo}>
  96. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>实名认证</Text>
  97. </TouchableOpacity>
  98. <View style={styles.attestationList}>
  99. <TouchableOpacity onPress={this.toCheckName}>
  100. <View style={styles.attestationItem}>
  101. <FontAwesome5
  102. name={"house-damage"}
  103. size={36}
  104. style={{ marginBottom: unitHeight * 24, color: "#DEDEDE" }}
  105. />
  106. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>实名认证</Text>
  107. </View>
  108. </TouchableOpacity>
  109. <TouchableOpacity onPress={this.toCheckWork}>
  110. <View style={styles.attestationItem}>
  111. <FontAwesome5
  112. name={"house-damage"}
  113. size={36}
  114. style={{ marginBottom: unitHeight * 24, color: "#DEDEDE" }}
  115. />
  116. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>工作认证</Text>
  117. </View>
  118. </TouchableOpacity>
  119. <TouchableOpacity onPress={this.toCheckSchool}>
  120. <View style={styles.attestationItem}>
  121. <FontAwesome5
  122. name={"house-damage"}
  123. size={36}
  124. style={{ marginBottom: unitHeight * 24, color: "#DEDEDE" }}
  125. />
  126. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>学历认证</Text>
  127. </View>
  128. </TouchableOpacity>
  129. <TouchableOpacity onPress={this.toCheckHouse}>
  130. <View style={styles.attestationItem}>
  131. <FontAwesome5
  132. name={"house-damage"}
  133. size={36}
  134. style={{ marginBottom: unitHeight * 24, color: "#DEDEDE" }}
  135. />
  136. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>房产认证</Text>
  137. </View>
  138. </TouchableOpacity>
  139. <TouchableOpacity onPress={this.toCheckCar}>
  140. <View style={styles.attestationItem}>
  141. <FontAwesome5
  142. name={"house-damage"}
  143. size={36}
  144. style={{ marginBottom: unitHeight * 24, color: "#DEDEDE" }}
  145. />
  146. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>车辆认证</Text>
  147. </View>
  148. </TouchableOpacity>
  149. </View>
  150. </View>
  151. </View>
  152. <View style={styles.hobby}>
  153. <Text style={styles.itemTitle}>兴趣标签</Text>
  154. <View style={styles.itemList}>
  155. <AntDesign
  156. name={"message1"}
  157. size={24}
  158. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  159. />
  160. <View style={styles.itemListCenter}>
  161. <View style={styles.itemListCOnce}>
  162. <Text style={styles.itemListOnceText}>
  163. 薯条
  164. </Text>
  165. </View>
  166. <View style={styles.itemListCOnce}>
  167. <Text style={styles.itemListOnceText}>
  168. 素食
  169. </Text>
  170. </View>
  171. <View style={styles.itemListCOnce}>
  172. <Text style={styles.itemListOnceText}>
  173. 甜品
  174. </Text>
  175. </View>
  176. </View>
  177. </View>
  178. <View style={styles.itemList}>
  179. <AntDesign
  180. name={"message1"}
  181. size={24}
  182. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  183. />
  184. <View style={styles.itemListCenter}>
  185. <View style={styles.itemListCOnce}>
  186. <Text style={styles.itemListOnceText}>
  187. 薯条
  188. </Text>
  189. </View>
  190. <View style={styles.itemListCOnce}>
  191. <Text style={styles.itemListOnceText}>
  192. 素食
  193. </Text>
  194. </View>
  195. <View style={styles.itemListCOnce}>
  196. <Text style={styles.itemListOnceText}>
  197. 甜品
  198. </Text>
  199. </View>
  200. </View>
  201. </View>
  202. <View style={styles.itemList}>
  203. <AntDesign
  204. name={"message1"}
  205. size={24}
  206. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  207. />
  208. <View style={styles.itemListCenter}>
  209. <View style={styles.itemListCOnce}>
  210. <Text style={styles.itemListOnceText}>
  211. 薯条
  212. </Text>
  213. </View>
  214. <View style={styles.itemListCOnce}>
  215. <Text style={styles.itemListOnceText}>
  216. 素食
  217. </Text>
  218. </View>
  219. <View style={styles.itemListCOnce}>
  220. <Text style={styles.itemListOnceText}>
  221. 甜品
  222. </Text>
  223. </View>
  224. </View>
  225. </View>
  226. <View style={styles.itemList}>
  227. <AntDesign
  228. name={"message1"}
  229. size={24}
  230. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  231. />
  232. <View style={styles.itemListCenter}>
  233. <View style={styles.itemListCOnce}>
  234. <Text style={styles.itemListOnceText}>
  235. 薯条
  236. </Text>
  237. </View>
  238. <View style={styles.itemListCOnce}>
  239. <Text style={styles.itemListOnceText}>
  240. 素食
  241. </Text>
  242. </View>
  243. <View style={styles.itemListCOnce}>
  244. <Text style={styles.itemListOnceText}>
  245. 甜品
  246. </Text>
  247. </View>
  248. </View>
  249. </View>
  250. </View>
  251. <View style={styles.chooseGirlFirend}>
  252. <TouchableOpacity onPress={this.toGirlFirend}>
  253. <Text style={styles.itemTitle}>择偶条件</Text>
  254. </TouchableOpacity>
  255. <View style={styles.friendList}>
  256. <Text style={styles.friendItem}>25-33岁</Text>
  257. <Text style={styles.friendItem}>155-175cm</Text>
  258. <Text style={styles.friendItem}>山东烟台</Text>
  259. <Text style={styles.friendItem}>大专</Text>
  260. <Text style={styles.friendItem}>未婚</Text>
  261. </View>
  262. </View>
  263. <View style={styles.questionAndAnswer}>
  264. <Text style={styles.itemTitle}>TA的问答</Text>
  265. <View style={styles.ansList}>
  266. <View style={styles.ansItem}>
  267. <Tips
  268. width={unitWidth * 90}
  269. height={unitHeight * 40}
  270. borderRadius={unitHeight * 40}
  271. bgColor="#FCF2F6"
  272. borderColor="#FA788A"
  273. fColor="#FA788A"
  274. fSize={unitWidth * 28}
  275. text="情感"
  276. />
  277. <View style={styles.ansitemRight}>
  278. <Text style={styles.ansitemRightTit}>假如有人要给你介绍对象,你更在意? </Text>
  279. <Text style={styles.ansitemRightSubTit}>我的答案是:对方的颜值、穿衣品味</Text>
  280. </View>
  281. </View>
  282. <View style={styles.ansItem}>
  283. <Tips
  284. width={unitWidth * 90}
  285. height={unitHeight * 40}
  286. borderRadius={unitHeight * 40}
  287. bgColor="#FFEDE5"
  288. borderColor="#FFC2A7"
  289. fColor="#FFC2A7"
  290. fSize={unitWidth * 28}
  291. text="生活"
  292. />
  293. <View style={styles.ansitemRight}>
  294. <Text style={styles.ansitemRightTit}>假如有人要给你介绍对象,你更在意? </Text>
  295. <Text style={styles.ansitemRightSubTit}>我的答案是:对方的颜值、穿衣品味</Text>
  296. </View>
  297. </View>
  298. <View style={styles.ansItem}>
  299. <Tips
  300. width={unitWidth * 90}
  301. height={unitHeight * 40}
  302. borderRadius={unitHeight * 40}
  303. bgColor="#F7F6FF"
  304. borderColor="#D1C4FB"
  305. fColor="#D1C4FB"
  306. fSize={unitWidth * 28}
  307. text="娱乐"
  308. />
  309. <View style={styles.ansitemRight}>
  310. <Text style={styles.ansitemRightTit}>假如有人要给你介绍对象,你更在意? </Text>
  311. <Text style={styles.ansitemRightSubTit}>我的答案是:对方的颜值、穿衣品味</Text>
  312. </View>
  313. </View>
  314. <View style={styles.ansItem}>
  315. <Tips
  316. width={unitWidth * 90}
  317. height={unitHeight * 40}
  318. borderRadius={unitHeight * 40}
  319. bgColor="#FCF2F6"
  320. borderColor="#FA788A"
  321. fColor="#FA788A"
  322. fSize={unitWidth * 28}
  323. text="情感"
  324. />
  325. <View style={styles.ansitemRight}>
  326. <Text style={styles.ansitemRightTit}>假如有人要给你介绍对象,你更在意? </Text>
  327. <Text style={styles.ansitemRightSubTit}>我的答案是:对方的颜值、穿衣品味</Text>
  328. </View>
  329. </View>
  330. </View>
  331. <AntDesign
  332. name={"down"}
  333. size={24}
  334. style={{ color: "#D4D4D4", alignSelf: "center", marginBottom: unitHeight * 30 }}
  335. />
  336. </View>
  337. <View style={styles.gift}>
  338. <TouchableOpacity onPress={this.toGift}>
  339. <Text style={styles.itemTitle}>TA的礼物</Text>
  340. </TouchableOpacity>
  341. <View style={styles.giftList}>
  342. <View style={styles.giftOnce}>
  343. <Image
  344. source={require("../../static/gift.png")}
  345. style={{ width: unitWidth * 90, height: unitHeight * 90 }}
  346. />
  347. <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>玫瑰 *21</Text>
  348. </View>
  349. <View style={styles.giftOnce}>
  350. <Image
  351. source={require("../../static/gift.png")}
  352. style={{ width: unitWidth * 90, height: unitHeight * 90 }}
  353. />
  354. <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>钻戒 *10</Text>
  355. </View>
  356. </View>
  357. </View>
  358. {
  359. this.state.pageStatus === 1 ? (<View style={styles.bottomtab}>
  360. <View style={styles.tabItem}>
  361. <AntDesign
  362. name={"message1"}
  363. size={30}
  364. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  365. />
  366. <Text style={{ color: "#333333", fontSize: unitWidth * 28 }}>心动</Text>
  367. </View>
  368. <View style={styles.tabItem}>
  369. <AntDesign
  370. name={"message1"}
  371. size={30}
  372. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  373. />
  374. <Text style={{ color: "#333333", fontSize: unitWidth * 28 }}>礼物</Text>
  375. </View>
  376. <View style={styles.tabItem}>
  377. <AntDesign
  378. name={"message1"}
  379. size={30}
  380. style={{ color: "#FA7B8D", marginRight: unitWidth * 20 }}
  381. />
  382. <Text style={{ color: "#333333", fontSize: unitWidth * 28 }}>聊天</Text>
  383. </View>
  384. </View>
  385. ) : null
  386. }
  387. </View>
  388. </ScrollView>
  389. )
  390. }
  391. }
  392. const styles = StyleSheet.create({
  393. container: {
  394. flex: 1,
  395. alignItems: "flex-end",
  396. backgroundColor: "#eee"
  397. },
  398. bannerBgc: {
  399. width: "100%",
  400. height: unitHeight * 540
  401. },
  402. topBgc: {
  403. width: "100%",
  404. height: unitHeight * 540,
  405. position: "relative",
  406. zIndex: 999
  407. },
  408. userPhoneArea: {
  409. position: "absolute",
  410. right: unitWidth * 25,
  411. bottom: unitHeight * -77,
  412. },
  413. userPhone: {
  414. width: unitWidth * 154,
  415. height: unitWidth * 154,
  416. borderRadius: unitHeight * 154
  417. },
  418. maleIconArea: {
  419. width: unitWidth * 28,
  420. height: unitWidth * 28,
  421. backgroundColor: "#75C4EF",
  422. borderRadius: unitHeight * 28,
  423. position: "absolute",
  424. bottom: 0,
  425. left: "50%",
  426. marginBottom: unitHeight * -10,
  427. transform: [{ translateX: unitWidth * -14 }]
  428. },
  429. maleIcon: {
  430. color: "#fff",
  431. marginLeft: unitWidth * 5
  432. },
  433. userTit: {
  434. width: "100%",
  435. paddingLeft: unitWidth * 24,
  436. paddingRight: unitWidth * 24,
  437. backgroundColor: "#fff",
  438. paddingBottom: unitHeight * 30
  439. },
  440. titRow: {
  441. flexDirection: "row",
  442. marginTop: unitHeight * 26,
  443. marginBottom: unitHeight * 28
  444. },
  445. subtitRow: {
  446. flexDirection: "row",
  447. marginTop: unitHeight * 30,
  448. marginBottom: unitHeight * 60
  449. },
  450. attestationList: {
  451. marginTop: unitHeight * 36,
  452. flexDirection: "row",
  453. justifyContent: "space-between"
  454. },
  455. attestationItem: {
  456. width: unitHeight * 94,
  457. alignItems: "center"
  458. },
  459. hobby: {
  460. width: "100%",
  461. height: unitHeight * 334,
  462. backgroundColor: "#fff",
  463. marginTop: unitHeight * 10,
  464. paddingTop: unitHeight * 30
  465. },
  466. itemTitle: {
  467. fontSize: unitWidth * 28,
  468. color: "#333333",
  469. marginLeft: unitWidth * 24
  470. },
  471. itemList: {
  472. flexDirection: "row",
  473. marginTop: unitHeight * 20,
  474. alignItems: "center",
  475. justifyContent: "flex-start",
  476. marginLeft: unitWidth * 40
  477. },
  478. itemListCenter: {
  479. width: unitWidth * 370,
  480. flexDirection: "row",
  481. justifyContent: "flex-start"
  482. },
  483. itemListCOnce: {
  484. height: unitHeight * 42,
  485. borderRadius: unitHeight * 28,
  486. justifyContent: "center",
  487. alignItems: "center",
  488. borderWidth: unitWidth * 1,
  489. borderColor: "#FFD1D1",
  490. width: unitWidth * 108,
  491. marginRight: unitWidth * 20,
  492. backgroundColor: "#FCF2F6"
  493. },
  494. itemListOnceText: {
  495. fontSize: unitWidth * 24,
  496. color: "#666666"
  497. },
  498. chooseGirlFirend: {
  499. width: "100%",
  500. height: unitHeight * 140,
  501. backgroundColor: "#fff",
  502. marginTop: unitHeight * 10,
  503. paddingTop: unitHeight * 30
  504. },
  505. friendList: {
  506. flexDirection: "row",
  507. marginTop: unitHeight * 20,
  508. alignItems: "center",
  509. justifyContent: "flex-start",
  510. marginLeft: unitWidth * 40
  511. },
  512. friendItem: {
  513. marginRight: unitWidth * 30,
  514. fontSize: unitWidth * 24,
  515. color: "#666666"
  516. },
  517. questionAndAnswer: {
  518. width: "100%",
  519. backgroundColor: "#fff",
  520. marginTop: unitHeight * 10,
  521. paddingTop: unitHeight * 30,
  522. marginBottom: unitHeight * 10
  523. },
  524. ansList: {
  525. marginTop: unitHeight * 30,
  526. paddingLeft: unitWidth * 45,
  527. },
  528. ansItem: {
  529. flexDirection: "row",
  530. marginBottom: unitHeight * 30
  531. },
  532. ansitemRight: {
  533. marginLeft: unitWidth * 40
  534. },
  535. ansitemRightTit: {
  536. fontSize: unitWidth * 28,
  537. color: "#333333",
  538. marginBottom: unitHeight * 20
  539. },
  540. ansitemRightSubTit: {
  541. fontSize: unitWidth * 24,
  542. color: "#999999"
  543. },
  544. gift: {
  545. width: "100%",
  546. paddingTop: unitHeight * 21,
  547. backgroundColor: "#fff"
  548. },
  549. giftList: {
  550. width: "100%",
  551. height: unitHeight * 215,
  552. marginTop: unitHeight * 47,
  553. paddingLeft: unitWidth * 50,
  554. flexDirection: "row"
  555. },
  556. giftOnce: {
  557. width: unitWidth * 100,
  558. height: unitHeight * 163,
  559. justifyContent: "space-between",
  560. alignItems: "center",
  561. marginRight: unitWidth * 70
  562. },
  563. bottomtab: {
  564. width: "100%",
  565. paddingLeft: unitWidth * 60,
  566. paddingRight: unitWidth * 60,
  567. flexDirection: "row",
  568. justifyContent: "space-between",
  569. backgroundColor: "#fff",
  570. paddingBottom: unitHeight * 25,
  571. },
  572. tabItem: {
  573. flexDirection: "row",
  574. alignItems: "center"
  575. }
  576. })