RecommendGamer.js 9.7 KB

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