GameLead.js 2.2 KB

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