forgetPassWord.js 5.8 KB

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