SendGift.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 SendGift extends Component {
  5. render() {
  6. return (
  7. <View style={styles.container}>
  8. <View style={styles.giftList}>
  9. <View style={styles.itemOnce}>
  10. <View style={styles.itemOnceTit}>
  11. <View style={styles.itemOnceUser}>
  12. <Image
  13. source={require("../../static/userPhone.png")}
  14. style={styles.userImg}
  15. />
  16. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>王先生</Text>
  17. </View>
  18. <Text style={{ fontSize: unitWidth * 24, color: "#666666" }}>12-03 13:15</Text>
  19. </View>
  20. <View style={styles.itemGiftInfo}>
  21. <View style={{ flexDirection: "row" }}>
  22. <Image
  23. source={require("../../static/gift.png")}
  24. style={styles.giftImg}
  25. />
  26. <View>
  27. <Text style={{ fontSize: unitWidth * 28, color: "#333333", marginBottom: unitHeight * 30 }}>告白玫瑰</Text>
  28. <Text style={{ fontSize: unitWidth * 28, color: "#EDB031" }}>¥6</Text>
  29. </View>
  30. </View>
  31. <View style={{ flexDirection: "row" }}>
  32. <Image
  33. source={require("../../static/gift.png")}
  34. style={{ width: unitWidth * 40, height: unitHeight * 38, marginLeft: unitWidth * 40 }}
  35. />
  36. <Image
  37. source={require("../../static/userPhone.png")}
  38. style={{ width: unitWidth * 40, height: unitHeight * 38, marginLeft: unitWidth * 40 }}
  39. />
  40. </View>
  41. </View>
  42. </View>
  43. </View>
  44. </View>
  45. )
  46. }
  47. }
  48. const styles = StyleSheet.create({
  49. container: {
  50. flex: 1,
  51. justifyContent: "center",
  52. alignItems: "center",
  53. backgroundColor: "#fff",
  54. paddingTop:unitHeight * 48,
  55. },
  56. giftList: {
  57. width: "100%",
  58. height: "100%",
  59. paddingLeft: unitWidth * 24,
  60. paddingRight: unitWidth * 24
  61. },
  62. itemOnce: {
  63. width: "100%",
  64. },
  65. itemOnceTit: {
  66. width: "100%",
  67. flexDirection: "row",
  68. justifyContent: "space-between",
  69. alignItems: "center"
  70. },
  71. itemOnceUser: {
  72. flexDirection: "row",
  73. alignItems: "center"
  74. },
  75. userImg: {
  76. width: unitWidth * 80,
  77. height: unitHeight * 80,
  78. marginRight: unitWidth * 28
  79. },
  80. itemGiftInfo: {
  81. width: unitWidth * 594,
  82. height: unitHeight * 130,
  83. backgroundColor: "#F9F9F9",
  84. alignSelf: "flex-end",
  85. flexDirection: "row",
  86. justifyContent: "space-between",
  87. alignItems: "center",
  88. paddingRight: unitWidth * 22
  89. },
  90. giftImg: {
  91. width: unitWidth * 80,
  92. height: unitHeight * 80,
  93. marginLeft: unitWidth * 24,
  94. marginRight: unitWidth * 20,
  95. }
  96. })