...
|
...
|
@@ -4,7 +4,7 @@ import React from 'react'; |
|
|
import ReactNative from 'react-native';
|
|
|
import Button from 'apsl-react-native-button';
|
|
|
|
|
|
let {
|
|
|
const {
|
|
|
Component,
|
|
|
} = React;
|
|
|
|
...
|
...
|
@@ -15,7 +15,7 @@ const { |
|
|
Text,
|
|
|
Dimensions,
|
|
|
TextInput,
|
|
|
TouchableWithoutFeedback,
|
|
|
TouchableOpacity,
|
|
|
} = ReactNative;
|
|
|
|
|
|
export default class Login extends Component {
|
...
|
...
|
@@ -38,60 +38,60 @@ export default class Login extends Component { |
|
|
|
|
|
|
|
|
renderUserText() {
|
|
|
return (
|
|
|
<View style={styles.textContainer}>
|
|
|
<TextInput
|
|
|
style={styles.username}
|
|
|
placeholder={'账号'}
|
|
|
underlineColorAndroid='transparent'
|
|
|
onChangeText={this.props.onAccountChange}
|
|
|
value={this.props.account}
|
|
|
selectionColor={'white'}
|
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
/>
|
|
|
<TouchableWithoutFeedback
|
|
|
onPress={this.props.onDeleteUserPress}>
|
|
|
<Image
|
|
|
style={styles.buttonDelete}
|
|
|
source={require('../images/delete.png')}
|
|
|
/>
|
|
|
</TouchableWithoutFeedback>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
renderPwdText() {
|
|
|
return (
|
|
|
<View style={styles.textContainer}>
|
|
|
<TextInput
|
|
|
style={styles.pwd}
|
|
|
secureTextEntry={this.props.isDisplayPwd?false:true}
|
|
|
placeholder={'密码'}
|
|
|
underlineColorAndroid='transparent'
|
|
|
onChangeText={this.props.onPwdChange}
|
|
|
value={this.props.pwd}
|
|
|
selectionColor={'white'}
|
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
/>
|
|
|
<TouchableWithoutFeedback
|
|
|
onPress={this.props.onShowPwdPress}>
|
|
|
<Image
|
|
|
style={styles.buttonDelete}
|
|
|
source={require('../images/eyes@2x.png')}
|
|
|
/>
|
|
|
</TouchableWithoutFeedback>
|
|
|
</View>
|
|
|
);
|
|
|
return (
|
|
|
<View style={styles.textContainer}>
|
|
|
<TextInput
|
|
|
style={styles.username}
|
|
|
placeholder={'账号'}
|
|
|
underlineColorAndroid='transparent'
|
|
|
onChangeText={this.props.onAccountChange}
|
|
|
value={this.props.account}
|
|
|
selectionColor={'white'}
|
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
/>
|
|
|
<TouchableOpacity
|
|
|
onPress={this.props.onDeleteUserPress}>
|
|
|
<Image
|
|
|
style={styles.buttonDelete}
|
|
|
source={require('../images/delete.png')}
|
|
|
/>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
renderPwdText() {
|
|
|
return (
|
|
|
<View style={styles.textContainer}>
|
|
|
<TextInput
|
|
|
style={styles.pwd}
|
|
|
secureTextEntry={this.props.isDisplayPwd?false:true}
|
|
|
placeholder={'密码'}
|
|
|
underlineColorAndroid='transparent'
|
|
|
onChangeText={this.props.onPwdChange}
|
|
|
value={this.props.pwd}
|
|
|
selectionColor={'white'}
|
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
/>
|
|
|
<TouchableOpacity
|
|
|
onPress={this.props.onShowPwdPress}>
|
|
|
<Image
|
|
|
style={styles.buttonDelete}
|
|
|
source={require('../images/eyes.png')}
|
|
|
/>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
render() {
|
|
|
|
|
|
return (
|
|
|
|
|
|
<Image style={styles.container} source={require('../images/login@2x.png')} resizeMode={'cover'} >
|
|
|
<Image style={styles.container} source={require('../images/login.png')} resizeMode={'cover'} >
|
|
|
<Image
|
|
|
style={styles.logo}
|
|
|
source={require('../images/logo@2x.png')}
|
|
|
source={require('../images/logo.png')}
|
|
|
/>
|
|
|
{this.renderUserText()}
|
|
|
{this.renderPwdText()}
|
...
|
...
|
|