userCard.js 23 KB

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