RecommendGamer.js 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, Image } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import FontAwesome from "react-native-vector-icons/FontAwesome"
  5. import MyButtom from '../component/MyButton'
  6. export default class RecommendGamer extends Component {
  7. render() {
  8. return (
  9. <View style={styles.container}>
  10. <View style={styles.gamerList}>
  11. <View style={styles.itemArea}>
  12. <View style={styles.itemTop}>
  13. <Image
  14. source={require("../../static/bannerBgc.png")}
  15. style={styles.phone}
  16. />
  17. <View style={styles.userInfo}>
  18. <View style={styles.userTit}>
  19. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>萱萱</Text>
  20. <Text>{"<500m"}</Text>
  21. </View>
  22. <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>26岁/163/本科/7000-10000</Text>
  23. <View style={styles.userTips}>
  24. <View style={styles.tipsOnce}>
  25. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>身材苗条</Text>
  26. </View>
  27. <View style={styles.tipsOnce}>
  28. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>文艺</Text>
  29. </View>
  30. <View style={styles.tipsOnce}>
  31. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>旅行</Text>
  32. </View>
  33. </View>
  34. </View>
  35. </View>
  36. <View style={styles.itemBottom}>
  37. <View style={styles.itemBottomLeft}>
  38. <FontAwesome
  39. name={"heartbeat"}
  40. size={20}
  41. style={{ color: "#FB788A" }}
  42. />
  43. <Text style={{ color: "#999999", fontSize: unitWidth * 24, marginLeft: unitWidth * 10 }}>魅力值:90</Text>
  44. </View>
  45. <View style={styles.itemBottomRight}>
  46. <MyButtom
  47. text={"查看关卡"}
  48. width={unitWidth * 144}
  49. height={unitHeight * 58}
  50. borderRadius={unitHeight * 10}
  51. bgColor="#fff"
  52. borderColor="#FA788A"
  53. borderWidth={1}
  54. shadowBgc="#fff"
  55. style={{ fontSize: unitWidth * 28, color: "#FA788A" }}
  56. />
  57. <MyButtom
  58. text={"开始闯关"}
  59. width={unitWidth * 144}
  60. height={unitHeight * 58}
  61. borderRadius={unitHeight * 10}
  62. bgColor="#FF4A6C"
  63. borderColor="#FF4A6C"
  64. borderWidth={1}
  65. shadowBgc="#FB788A"
  66. style={{ fontSize: unitWidth * 28, color: "#fff" }}
  67. />
  68. </View>
  69. </View>
  70. </View>
  71. <View style={styles.itemArea}>
  72. <View style={styles.itemTop}>
  73. <Image
  74. source={require("../../static/bannerBgc.png")}
  75. style={styles.phone}
  76. />
  77. <View style={styles.userInfo}>
  78. <View style={styles.userTit}>
  79. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>萱萱</Text>
  80. <Text>{"<500m"}</Text>
  81. </View>
  82. <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>26岁/163/本科/7000-10000</Text>
  83. <View style={styles.userTips}>
  84. <View style={styles.tipsOnce}>
  85. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>身材苗条</Text>
  86. </View>
  87. <View style={styles.tipsOnce}>
  88. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>文艺</Text>
  89. </View>
  90. <View style={styles.tipsOnce}>
  91. <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>旅行</Text>
  92. </View>
  93. </View>
  94. </View>
  95. </View>
  96. <View style={styles.itemBottom}>
  97. <View style={styles.itemBottomLeft}>
  98. <FontAwesome
  99. name={"heartbeat"}
  100. size={20}
  101. style={{ color: "#FB788A" }}
  102. />
  103. <Text style={{ color: "#999999", fontSize: unitWidth * 24, marginLeft: unitWidth * 10 }}>魅力值:90</Text>
  104. </View>
  105. <View style={styles.itemBottomRight}>
  106. <MyButtom
  107. text={"查看关卡"}
  108. width={unitWidth * 144}
  109. height={unitHeight * 58}
  110. borderRadius={unitHeight * 10}
  111. bgColor="#fff"
  112. borderColor="#FA788A"
  113. borderWidth={1}
  114. shadowBgc="#fff"
  115. style={{ fontSize: unitWidth * 28, color: "#FA788A" }}
  116. />
  117. <MyButtom
  118. text={"开始闯关"}
  119. width={unitWidth * 144}
  120. height={unitHeight * 58}
  121. borderRadius={unitHeight * 10}
  122. bgColor="#FF4A6C"
  123. borderColor="#FF4A6C"
  124. borderWidth={1}
  125. shadowBgc="#FB788A"
  126. style={{ fontSize: unitWidth * 28, color: "#fff" }}
  127. />
  128. </View>
  129. </View>
  130. </View>
  131. </View>
  132. </View>
  133. )
  134. }
  135. }
  136. const styles = StyleSheet.create({
  137. container: {
  138. flex: 1,
  139. alignItems: "center",
  140. paddingLeft: unitWidth * 23,
  141. paddingRight: unitWidth * 23,
  142. paddingTop: unitHeight * 57
  143. },
  144. gamerList: {
  145. width: "100%"
  146. },
  147. itemArea: {
  148. width: unitWidth * 702,
  149. height: unitHeight * 308,
  150. backgroundColor: "#F9F9F9",
  151. borderRadius: unitHeight * 10,
  152. paddingTop: unitHeight * 20,
  153. marginBottom:unitHeight * 30,
  154. paddingLeft:unitWidth * 20
  155. },
  156. itemTop: {
  157. flexDirection: "row"
  158. },
  159. phone: {
  160. flex: 1,
  161. height: unitHeight * 180
  162. },
  163. userInfo: {
  164. flex: 2,
  165. paddingLeft: unitWidth * 20,
  166. paddingRight: unitWidth * 20
  167. },
  168. userTit: {
  169. flexDirection: "row",
  170. justifyContent: "space-between",
  171. marginBottom: unitHeight * 30
  172. },
  173. userTips: {
  174. flexDirection: "row",
  175. marginTop: unitHeight * 25
  176. },
  177. tipsOnce: {
  178. height: unitHeight * 42,
  179. backgroundColor: "#FCF2F6",
  180. borderRadius: unitHeight * 42,
  181. justifyContent: "center",
  182. alignItems: "center",
  183. paddingLeft: unitWidth * 20,
  184. paddingRight: unitWidth * 20,
  185. marginLeft: unitWidth * 10,
  186. marginRight: unitWidth * 10
  187. },
  188. itemBottom: {
  189. flexDirection: "row",
  190. justifyContent: "space-between",
  191. alignItems: "center",
  192. marginTop: unitHeight * 30,
  193. paddingLeft: unitWidth * 20,
  194. paddingRight: unitWidth * 20
  195. },
  196. itemBottomLeft: {
  197. flexDirection: "row",
  198. },
  199. itemBottomRight: {
  200. flexDirection: "row",
  201. width: unitWidth * 320,
  202. justifyContent: "space-between"
  203. }
  204. })