|
@@ -3,6 +3,7 @@ import { StyleSheet, Text, View, TextInput } from "react-native"
|
|
|
import EvilIcons from "react-native-vector-icons/EvilIcons"
|
|
|
import { unitWidth, unitHeight, getStatusBarHeight } from "../utils/AdapterUtil";
|
|
|
import MyButtom from '../component/MyButton'
|
|
|
+import NavigationUtil from "../navigator/NavigationUtil"
|
|
|
|
|
|
export default class Loginpage extends Component {
|
|
|
state = {
|
|
@@ -10,13 +11,16 @@ export default class Loginpage extends Component {
|
|
|
pageStatus: 0,
|
|
|
btnText: "登录"
|
|
|
};
|
|
|
- componentDidMount() {
|
|
|
- this.timer = setTimeout(() => {
|
|
|
- // NavigationUtil.resetToHomePage(this.props)
|
|
|
- }, 5000)
|
|
|
+ tohome=()=>{
|
|
|
+ NavigationUtil.resetToHomePage(this.props)
|
|
|
}
|
|
|
- componentWillMount() {
|
|
|
- this.timer && clearTimeout(this.timer)
|
|
|
+ toRegister=()=>{
|
|
|
+ const { navigation } = this.props;
|
|
|
+ navigation.navigate("Register")
|
|
|
+ }
|
|
|
+ toForgetPassWord=()=>{
|
|
|
+ const { navigation } = this.props;
|
|
|
+ navigation.navigate("ForgetPassWord")
|
|
|
}
|
|
|
render() {
|
|
|
return (
|
|
@@ -53,11 +57,12 @@ export default class Loginpage extends Component {
|
|
|
</View>
|
|
|
</View>
|
|
|
<View style={styles.forgetPassArea}>
|
|
|
- <Text>手机号注册登录</Text>
|
|
|
- <Text>忘记密码</Text>
|
|
|
+ <Text onPress={this.toRegister}>手机号注册登录</Text>
|
|
|
+ <Text onPress={this.toForgetPassWord}>忘记密码</Text>
|
|
|
</View>
|
|
|
<View style={styles.bottomBtn}>
|
|
|
<MyButtom
|
|
|
+ onPress={this.tohome}
|
|
|
text={this.state.btnText}
|
|
|
width={unitWidth * 502}
|
|
|
height={unitHeight * 84}
|