Referral.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /**
  2. * Referral页面
  3. * @邠心vbe on 2021/05/08
  4. */
  5. import React, { Component } from 'react';
  6. import { View, Text, StyleSheet, Image, ScrollView } from 'react-native';
  7. import Button from '../../components/Button';
  8. //import Share from 'react-native-share';
  9. export default class Referral extends Component {
  10. constructor(props) {
  11. super(props);
  12. this.state = {
  13. };
  14. }
  15. render() {
  16. return (
  17. <ScrollView
  18. style={styles.container}>
  19. <View style={styles.codeView}>
  20. <Text style={styles.codeTitle}>Your Referral Code</Text>
  21. <Text style={styles.codeText}>{userInfo.referralCode}</Text>
  22. <Text style={styles.codeTips}>Input this at the Registration page</Text>
  23. {/* <View style={ui.center}>
  24. <Image
  25. style={styles.codeImage}
  26. source={require('../../images/user/qr-referral-code.png')}/>
  27. </View>
  28. <Text style={styles.codeTips2}>Let your friends scan QR</Text> */}
  29. </View>
  30. <Text style={styles.refferalTips}>Refer a friend to the app receive <Text style={ui.mainText}>{currency}1</Text> into your Juice+ CreditWallet. You will receive <Text style={ui.mainText}>{currency}5</Text> into your Juice+ CreditWallet for your referrer's first credit top-up.</Text>
  31. {/* <Button
  32. style={styles.shareButton}
  33. onClick={() => {
  34. Share.open({
  35. title: 'Share',
  36. message: 'Share Juice Plus',
  37. url: 'https://csms.evctechnology.com'
  38. }).then((res) => {
  39. console.log('share app', res);
  40. }).catch((err) => {
  41. err && console.info('share app', err);
  42. });
  43. }}>
  44. <Entypo
  45. name='share'
  46. size={16}
  47. color={'#000'}/>
  48. <Text style={styles.shareText}>Share to Friends</Text>
  49. </Button> */}
  50. </ScrollView>
  51. );
  52. }
  53. }
  54. const styles = StyleSheet.create({
  55. container: {
  56. flex: 1,
  57. backgroundColor: 'white'
  58. },
  59. topImage: {
  60. width: $vw(100),
  61. height: $vw(78.75)
  62. },
  63. codeView: {
  64. width: $vw(83),
  65. padding: 16,
  66. marginTop: -43,
  67. marginLeft: $vw(8.5),
  68. borderRadius: 20,
  69. borderWidth: 1,
  70. borderColor: 'rgba(0,0,0,0.1)',
  71. backgroundColor: 'white'
  72. },
  73. codeTitle: {
  74. color: '#000',
  75. fontSize: 16,
  76. textAlign: 'center'
  77. },
  78. codeText: {
  79. color: '#FF7A00',
  80. fontSize: 26,
  81. fontWeight: 'bold',
  82. textAlign: 'center',
  83. paddingTop: 6
  84. },
  85. codeTips: {
  86. color: '#333',
  87. fontSize: 11,
  88. textAlign: 'center',
  89. marginLeft: 8,
  90. marginRight: 8,
  91. paddingTop: 10,
  92. paddingBottom: 16,
  93. //borderBottomWidth: 1,
  94. borderBottomColor: '#eee',
  95. },
  96. codeTips2: {
  97. color: '#333',
  98. fontSize: 12,
  99. textAlign: 'center'
  100. },
  101. codeImage: {
  102. width: 170,
  103. height: 170,
  104. margin: 16,
  105. },
  106. refferalTips: {
  107. color: '#000',
  108. fontSize: 14,
  109. paddingTop: 16,
  110. lineHeight: 22,
  111. paddingLeft: 16,
  112. paddingRight: 16,
  113. textAlign: 'center'
  114. },
  115. shareButton: {
  116. margin: 32,
  117. elevation: 2,
  118. borderRadius: 4,
  119. alignItems: 'center',
  120. flexDirection: 'row',
  121. justifyContent: 'center',
  122. backgroundColor: colorAccent
  123. },
  124. shareText: {
  125. color: '#000',
  126. fontSize: 16,
  127. paddingLeft: 4
  128. }
  129. });