GameLead.js 2.5 KB

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