GiftPay.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, Image } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import AntDesign from "react-native-vector-icons/AntDesign"
  5. import FontAwesome from "react-native-vector-icons/FontAwesome"
  6. export default class GiftPay extends Component {
  7. render() {
  8. return (
  9. <View style={styles.container}>
  10. <View style={styles.topInfo}>
  11. <Text style={{ fontSize: unitWidth * 24, color: "#666666", marginTop: unitHeight * 20 }}>送个小礼物,敲开爱的大门,拉近彼此的距离</Text>
  12. <View style={styles.giftInfo}>
  13. <Image
  14. source={require("../../static/gift.png")}
  15. style={styles.giftImg}
  16. />
  17. <View style={styles.giftText}>
  18. <Text style={{ fontSize: unitWidth * 28, color: "#333333", marginBottom: unitHeight * 20 }}>礼物:告白玫瑰</Text>
  19. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>总价:¥6</Text>
  20. </View>
  21. </View>
  22. </View>
  23. <View style={styles.pay}>
  24. <View style={styles.payTit}>
  25. <AntDesign
  26. name={"pay-circle1"}
  27. size={24}
  28. style={{ color: "#FA788A", marginRight: unitWidth * 12 }}
  29. />
  30. <Text style={{ color: "#666666", fontSize: unitWidth * 28 }}>请选择支付方式</Text>
  31. </View>
  32. <View style={styles.payList}>
  33. <View style={styles.payItem}>
  34. <AntDesign
  35. name={"alipay-square"}
  36. size={24}
  37. style={{ color: "#108ee9", marginRight: unitWidth * 16 }}
  38. />
  39. <Text style={{ color: "#333333", fontSize: unitWidth * 28 }}>支付宝</Text>
  40. </View>
  41. <View style={styles.payItem}>
  42. <FontAwesome
  43. name={"weixin"}
  44. size={24}
  45. style={{ color: "#04BE02", marginRight: unitWidth * 16 }}
  46. />
  47. <Text style={{ color: "#333333", fontSize: unitWidth * 28 }}>微信</Text>
  48. </View>
  49. </View>
  50. </View>
  51. </View>
  52. )
  53. }
  54. }
  55. const styles = StyleSheet.create({
  56. container: {
  57. flex: 1,
  58. alignItems: "center"
  59. },
  60. topInfo: {
  61. width: "100%",
  62. flex: 1,
  63. backgroundColor: "#fff",
  64. paddingLeft: unitWidth * 24,
  65. marginBottom: unitHeight * 20
  66. },
  67. giftInfo: {
  68. flexDirection: "row",
  69. marginTop: unitHeight * 30
  70. },
  71. giftImg: {
  72. width: unitWidth * 80,
  73. height: unitHeight * 80,
  74. marginLeft:unitWidth * 20,
  75. },
  76. giftText: {
  77. marginLeft: unitWidth * 40
  78. },
  79. pay: {
  80. flex: 5,
  81. width: "100%",
  82. backgroundColor: "#fff"
  83. },
  84. payTit: {
  85. flexDirection: "row",
  86. alignItems: "center",
  87. marginTop: unitHeight * 35,
  88. marginLeft: unitHeight * 24
  89. },
  90. payList: {
  91. width: "100%",
  92. height: unitHeight * 76,
  93. paddingLeft: unitWidth * 73,
  94. paddingRight: unitWidth * 73,
  95. marginTop: unitHeight * 40,
  96. flexDirection: "row",
  97. justifyContent: "space-between"
  98. },
  99. payItem: {
  100. width: unitWidth * 250,
  101. height: unitHeight * 76,
  102. flexDirection: "row",
  103. borderColor: "#DEDEDE",
  104. borderWidth: 1,
  105. justifyContent: "center",
  106. alignItems: "center"
  107. }
  108. })