userCard.js 25 KB

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