Setting.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. import React, { Component } from "react"
  2. import { StyleSheet, View, Text, TouchableOpacity } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. import RNPickerSelect from 'react-native-picker-select';
  5. import AntDesign from "react-native-vector-icons/AntDesign"
  6. import MyButtom from '../component/MyButton'
  7. export default class Setting extends Component {
  8. toSuggestion = () => {
  9. const { navigation } = this.props;
  10. navigation.navigate("Suggestion")
  11. }
  12. toUserAgree = () => {
  13. const { navigation } = this.props;
  14. navigation.navigate("UserAgree")
  15. }
  16. render() {
  17. return (
  18. <View style={styles.container}>
  19. <View style={styles.formArea}>
  20. <View style={styles.formItem}>
  21. <RNPickerSelect
  22. placeholder={""}
  23. disabled={true}
  24. onValueChange={(value) => console.log(value)}
  25. items={[
  26. { label: 'Football', value: 'football' },
  27. { label: 'Baseball', value: 'baseball' },
  28. { label: 'Hockey', value: 'hockey' },
  29. ]}
  30. >
  31. <View style={styles.itemArea}>
  32. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>我的资料</Text>
  33. <AntDesign
  34. name={"right"}
  35. size={20}
  36. style={{ color: "#999999" }}
  37. />
  38. </View>
  39. </RNPickerSelect>
  40. </View>
  41. <TouchableOpacity onPress={this.toSuggestion}>
  42. <View style={styles.formItem}>
  43. {/* <RNPickerSelect
  44. placeholder={""}
  45. disabled={true}
  46. onValueChange={(value) => console.log(value)}
  47. items={[
  48. { label: 'Football', value: 'football' },
  49. { label: 'Baseball', value: 'baseball' },
  50. { label: 'Hockey', value: 'hockey' },
  51. ]}
  52. > */}
  53. <View style={styles.itemArea}>
  54. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>用户反馈</Text>
  55. <AntDesign
  56. name={"right"}
  57. size={20}
  58. style={{ color: "#999999" }}
  59. />
  60. </View>
  61. {/* </RNPickerSelect> */}
  62. </View>
  63. </TouchableOpacity>
  64. <TouchableOpacity onPress={this.toUserAgree}>
  65. <View style={styles.formItem}>
  66. {/* <RNPickerSelect
  67. placeholder={""}
  68. disabled={true}
  69. onValueChange={(value) => console.log(value)}
  70. items={[
  71. { label: 'Football', value: 'football' },
  72. { label: 'Baseball', value: 'baseball' },
  73. { label: 'Hockey', value: 'hockey' },
  74. ]}
  75. > */}
  76. <View style={styles.itemArea}>
  77. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>用户及隐私协议</Text>
  78. <AntDesign
  79. name={"right"}
  80. size={20}
  81. style={{ color: "#999999" }}
  82. />
  83. </View>
  84. {/* </RNPickerSelect> */}
  85. </View>
  86. </TouchableOpacity>
  87. <View style={styles.formItem}>
  88. <RNPickerSelect
  89. placeholder={""}
  90. onValueChange={(value) => console.log(value)}
  91. items={[
  92. { label: 'Football', value: 'football' },
  93. { label: 'Baseball', value: 'baseball' },
  94. { label: 'Hockey', value: 'hockey' },
  95. ]}
  96. >
  97. <View style={styles.itemArea}>
  98. <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>清除缓存</Text>
  99. <AntDesign
  100. name={"right"}
  101. size={20}
  102. style={{ color: "#999999" }}
  103. />
  104. </View>
  105. </RNPickerSelect>
  106. </View>
  107. </View>
  108. <View style={styles.bottomBtn}>
  109. <MyButtom
  110. text={"退出登录"}
  111. width={unitWidth * 502}
  112. height={unitHeight * 84}
  113. borderRadius={unitHeight * 84}
  114. bgColor="#FA788A"
  115. shadowBgc="rgba(250,120,138,1)"
  116. style={{ fontSize: unitWidth * 32 }}
  117. />
  118. </View>
  119. </View>
  120. )
  121. }
  122. }
  123. const styles = StyleSheet.create({
  124. container: {
  125. flex: 1,
  126. alignItems: "center"
  127. },
  128. formArea: {
  129. width: "100%"
  130. },
  131. formItem: {
  132. width: "100%",
  133. height: unitHeight * 97,
  134. backgroundColor: "#fff",
  135. marginBottom: unitHeight * 6,
  136. },
  137. itemArea: {
  138. width: "100%",
  139. height: "100%",
  140. flexDirection: "row",
  141. justifyContent: "space-between",
  142. alignItems: "center",
  143. paddingLeft: unitWidth * 23,
  144. paddingRight: unitWidth * 24,
  145. borderBottomColor: "#F9F9F9",
  146. borderBottomWidth: 1
  147. },
  148. bottomBtn: {
  149. width: "100%",
  150. marginTop: unitHeight * 196,
  151. height: unitHeight * 84,
  152. justifyContent: 'center',
  153. alignItems: 'center'
  154. },
  155. })