GameLead.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, ImageBackground } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import MyButtom from '../component/MyButton'
  5. export default class GameLead extends Component {
  6. toHomePage = () => {
  7. const { navigation } = this.props;
  8. navigation.navigate("BottomTabNavigator")
  9. }
  10. render() {
  11. return (
  12. <ImageBackground source={require('../../static/gameLead.jpg')}
  13. style={styles.container}
  14. >
  15. <View style={styles.btnArea}>
  16. <MyButtom
  17. onPress={this.toHomePage}
  18. text={"去游戏"}
  19. width={unitWidth * 502}
  20. height={unitHeight * 84}
  21. borderRadius={unitHeight * 84}
  22. bgColor="#FA788A"
  23. shadowBgc="rgba(250,120,138,1)"
  24. style={{ fontSize: unitWidth * 32 }}
  25. />
  26. <MyButtom
  27. onPress={this.toHomePage}
  28. text={"回主页"}
  29. width={unitWidth * 502}
  30. height={unitHeight * 84}
  31. borderRadius={unitHeight * 84}
  32. bgColor="#fff"
  33. shadowBgc="rgba(250,120,138,1)"
  34. style={{ fontSize: unitWidth * 32, color: "#FB788A" }}
  35. />
  36. </View>
  37. <View style={styles.textInfo}>
  38. <Text style={styles.text}>亲爱的XXX,欢迎进入XXX,来游戏大厅和大家一起尽情玩耍吧,在这里遇到志同道合的伴侣几率为95%哦,一起来吧</Text>
  39. </View>
  40. </ImageBackground>
  41. )
  42. }
  43. }
  44. const styles = StyleSheet.create({
  45. container: {
  46. flex: 1,
  47. alignItems: "center",
  48. justifyContent: "flex-end"
  49. },
  50. btnArea: {
  51. height: unitHeight * 212,
  52. justifyContent: "space-between"
  53. },
  54. textInfo: {
  55. width: unitWidth * 558,
  56. height: unitHeight * 123,
  57. marginBottom: unitHeight * 85,
  58. marginTop: unitHeight * 213
  59. },
  60. text: {
  61. fontSize: unitWidth * 28,
  62. color: "#fff",
  63. lineHeight: unitHeight * 35
  64. }
  65. })