Referral.js 3.4 KB

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