forgetPassWord.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, TextInput } from "react-native"
  3. import { unitWidth, unitHeight, getStatusBarHeight } from "../utils/AdapterUtil";
  4. import MyButtom from '../component/MyButton'
  5. import NavigationUtil from "../navigator/NavigationUtil"
  6. export default class ForgetPassWord extends Component {
  7. state = {
  8. pageTitle: "忘记密码",
  9. btnText: "保存"
  10. };
  11. toLogin=()=>{
  12. NavigationUtil.resetToLoginPage(this.props)
  13. }
  14. render() {
  15. return (
  16. <View style={styles.container}>
  17. <Text style={styles.loginTitle}>{this.state.pageTitle}</Text>
  18. <View style={styles.inputArea}>
  19. <View style={styles.inputPhone}>
  20. <View style={styles.inputLeft}>
  21. <Text style={styles.inputLeftText}>+86</Text>
  22. </View>
  23. <View style={styles.inputRight}>
  24. <TextInput
  25. placeholder="请输入手机号"
  26. placeholderTextColor={"#999999"}
  27. style={styles.TextInput}
  28. />
  29. </View>
  30. </View>
  31. <View style={styles.inputPass}>
  32. <View style={styles.inputLeft}>
  33. <Text style={styles.inputLeftText}>验证码</Text>
  34. </View>
  35. <View style={styles.TextInputRightArea2}>
  36. <TextInput
  37. placeholder="请输入验证码"
  38. placeholderTextColor={"#999999"}
  39. style={styles.TextInput2}
  40. />
  41. </View>
  42. <View style={styles.verifyCodeArea}>
  43. <Text>获取验证码</Text>
  44. </View>
  45. </View>
  46. </View>
  47. <View style={styles.inputNewPass}>
  48. <View style={styles.inputLeft}>
  49. <Text style={styles.inputLeftText}>输入新密码</Text>
  50. </View>
  51. <View style={styles.inputRight}>
  52. <TextInput
  53. placeholder="请输入新密码"
  54. placeholderTextColor={"#999999"}
  55. style={styles.TextInput}
  56. />
  57. </View>
  58. </View>
  59. <View style={styles.bottomBtn}>
  60. <MyButtom
  61. onPress={this.toLogin}
  62. text={this.state.btnText}
  63. width={unitWidth * 502}
  64. height={unitHeight * 84}
  65. borderRadius={unitHeight * 84}
  66. bgColor="#FA788A"
  67. shadowBgc="rgba(250,120,138,1)"
  68. style={{ fontSize: unitWidth * 32 }}
  69. />
  70. </View>
  71. </View>
  72. )
  73. }
  74. }
  75. const styles = StyleSheet.create({
  76. container: {
  77. flex: 1,
  78. paddingTop: getStatusBarHeight() + unitHeight * 138,
  79. paddingLeft: unitWidth * 60,
  80. paddingRight: unitWidth * 60,
  81. },
  82. loginTitle: {
  83. fontSize: unitWidth * 38,
  84. fontWeight: "bold",
  85. color: "rgba(250,120,138,1)",
  86. marginBottom: unitWidth * 70
  87. },
  88. inputArea: {
  89. width: unitWidth * 628,
  90. justifyContent: "space-between"
  91. },
  92. inputPhone: {
  93. width: "100%",
  94. height: unitHeight * 98,
  95. borderRadius: unitWidth * 98,
  96. borderWidth: unitWidth * 1,
  97. borderColor: "#ccc",
  98. flexDirection: "row"
  99. },
  100. inputNewPass: {
  101. width: "100%",
  102. height: unitHeight * 98,
  103. borderRadius: unitWidth * 98,
  104. borderWidth: unitWidth * 1,
  105. borderColor: "#ccc",
  106. flexDirection: "row",
  107. marginTop: unitHeight * 40,
  108. },
  109. inputLeft: {
  110. marginTop: unitHeight * 9,
  111. width: unitWidth * 147,
  112. height: unitHeight * 80,
  113. borderRightWidth: unitWidth * 1,
  114. borderRightColor: "#ccc",
  115. justifyContent: "center",
  116. alignItems: "center"
  117. },
  118. inputRight: {
  119. width: unitWidth * 480,
  120. height: "100%"
  121. },
  122. TextInput: {
  123. width: "100%",
  124. height: "100%",
  125. paddingLeft: unitWidth * 26,
  126. fontSize: unitWidth * 28
  127. },
  128. TextInput2: {
  129. fontSize: unitWidth * 28
  130. },
  131. TextInputRightArea2: {
  132. flex: 3,
  133. height: "100%",
  134. paddingLeft: unitWidth * 26,
  135. fontSize: unitWidth * 28,
  136. justifyContent: "center"
  137. },
  138. verifyCodeArea: {
  139. flex: 2,
  140. height: "100%",
  141. justifyContent: "center",
  142. alignItems: "center"
  143. },
  144. verifyCode: {
  145. fontSize: unitWidth * 28,
  146. color: "#333333"
  147. },
  148. inputPass: {
  149. width: "100%",
  150. marginTop: unitHeight * 40,
  151. height: unitHeight * 98,
  152. borderRadius: unitWidth * 98,
  153. borderWidth: unitWidth * 1,
  154. borderColor: "#ccc",
  155. flexDirection: "row"
  156. },
  157. forgetPassArea: {
  158. flexDirection: "row",
  159. justifyContent: "space-between",
  160. width: "100%",
  161. fontSize: unitWidth * 28,
  162. color: "#333333",
  163. marginTop: unitHeight * 28
  164. },
  165. bottomBtn: {
  166. width: "100%",
  167. marginTop: unitHeight * 98,
  168. height: unitHeight * 84,
  169. justifyContent: 'center',
  170. alignItems: 'center'
  171. },
  172. agree: {
  173. width: "100%",
  174. height: unitHeight * 26,
  175. flexDirection: "row",
  176. justifyContent: "center",
  177. alignItems: "center",
  178. marginTop: unitHeight * 30
  179. }
  180. })