PassMode.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, Image } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. export default class PassMode extends Component {
  5. render() {
  6. return (
  7. <View style={styles.container}>
  8. <View style={{ alignItems: "center", marginBottom: unitHeight * 60 }}>
  9. <Image
  10. source={require("../../static/passSuccess.png")}
  11. style={styles.topIcon}
  12. />
  13. <Text style={{ fontSize: unitWidth * 28, color: "#FA788A", marginBottom: unitHeight * 10 }}>恭喜您闯关成功!</Text>
  14. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>请选择您想要获得的奖励吧~</Text>
  15. </View>
  16. <View style={styles.btnList}>
  17. <View style={styles.btnItem}>
  18. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>获得关主的手机号</Text>
  19. </View>
  20. <View style={styles.btnItemRed}>
  21. <Text style={{ fontSize: unitWidth * 28, color: "#fff" }}>查看关主的生活照</Text>
  22. </View>
  23. <View style={styles.btnItem}>
  24. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>和关主一起玩推理游戏</Text>
  25. </View>
  26. <View style={styles.btnItem}>
  27. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>自定义</Text>
  28. </View>
  29. </View>
  30. </View>
  31. )
  32. }
  33. }
  34. const styles = StyleSheet.create({
  35. container: {
  36. flex: 1,
  37. alignItems: "center",
  38. paddingTop: unitHeight * 25,
  39. backgroundColor:"#fff"
  40. },
  41. topIcon: {
  42. width: unitWidth * 235,
  43. height: unitHeight * 210,
  44. marginBottom: unitHeight * 44
  45. },
  46. btnList: {
  47. alignItems: "center"
  48. },
  49. btnItem: {
  50. width: unitWidth * 502,
  51. height: unitHeight * 80,
  52. justifyContent: "center",
  53. alignItems: "center",
  54. backgroundColor: "#F2F2F2",
  55. marginBottom: unitHeight * 30,
  56. borderRadius: unitHeight * 80
  57. },
  58. btnItemRed:{
  59. width: unitWidth * 502,
  60. height: unitHeight * 80,
  61. justifyContent: "center",
  62. alignItems: "center",
  63. backgroundColor: "#FB788A",
  64. marginBottom: unitHeight * 30,
  65. borderRadius: unitHeight * 80
  66. }
  67. })