Authored by 于良

Merge branch 'local' into develop

... ... @@ -3,37 +3,37 @@
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "潮店宝-58.png",
"filename" : "贩售通-58.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "潮店宝-87.png",
"filename" : "贩售通-87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "潮店宝-80.png",
"filename" : "贩售通-80.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "潮店宝-120.png",
"filename" : "贩售通-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "潮店宝-121.png",
"filename" : "贩售通-121.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "潮店宝-180.png",
"filename" : "贩售通-180.png",
"scale" : "3x"
}
],
... ...
... ... @@ -44,6 +44,7 @@ export default class Login extends Component {
<TextInput
style={styles.username}
placeholder={'账号'}
placeholderTextColor={'#bababa'}
underlineColorAndroid='transparent'
onChangeText={this.props.onAccountChange}
value={this.props.account}
... ... @@ -56,7 +57,7 @@ export default class Login extends Component {
onPress={this.props.onDeleteUserPress}>
<Image
style={styles.buttonDelete}
resizeMode={Image.resizeMode.contain}
resizeMode={'contain'}
source={require('../images/delete.png')}
/>
</TouchableOpacity>
... ... @@ -70,6 +71,7 @@ export default class Login extends Component {
style={styles.pwd}
secureTextEntry={this.props.isDisplayPwd?false:true}
placeholder={'密码'}
placeholderTextColor={'#bababa'}
underlineColorAndroid='transparent'
onChangeText={this.props.onPwdChange}
selectionColor={'white'}
... ... @@ -81,7 +83,7 @@ export default class Login extends Component {
onPress={this.props.onShowPwdPress}>
<Image
style={styles.buttonDisplayPwd}
resizeMode={Image.resizeMode.contain}
resizeMode={'contain'}
source={this.props.isDisplayPwd?require('../images/eyes.png'):require('../images/eyeopen.png')}
/>
</TouchableOpacity>
... ... @@ -94,8 +96,9 @@ export default class Login extends Component {
<Image style={styles.container} source={require('../images/login.png')} resizeMode={'cover'} >
<Image
resizeMode={'contain'}
style={styles.logo}
source={require('../images/logo.png')}
source={require('../images/login_icon_logo.png')}
/>
{this.renderUserText()}
{this.renderPwdText()}
... ... @@ -106,7 +109,11 @@ export default class Login extends Component {
>
登录
</Button>
<Image
resizeMode={'contain'}
style={styles.yohoLogo}
source={require('../images/login_icon_logo1.png')}
/>
<LoadingIndicator
isVisible={this.props.isFetching}
/>
... ... @@ -136,12 +143,13 @@ var styles = StyleSheet.create({
justifyContent: 'center',
borderRadius:5,
backgroundColor: 'gray',
marginBottom: 10,
marginBottom: 13,
},
logo: {
width:256,
height:40,
marginBottom: 40,
width: 259,
height: 86,
marginTop: 50,
marginBottom: 85,
},
username: {
flex: 1,
... ... @@ -168,13 +176,18 @@ var styles = StyleSheet.create({
fontSize: 18,
},
buttonDelete: {
width:20,
height:20,
marginRight:10,
width:15,
height:15,
marginRight:13,
},
buttonDisplayPwd: {
width:25,
height:18,
width:21,
height:14,
marginRight:10,
},
yohoLogo: {
width: 160,
height: 35,
marginTop: 130,
},
});
... ...
... ... @@ -88,6 +88,23 @@ export default class LoginContainer extends Component {
}
onLoginPress() {
if (!this.props.user.profile.account || this.props.user.profile.account.length == 0) {
Alert.alert(
'登录消息',
'请输入帐号',
[{text: 'OK'}]
);
return;
}
if (!this.props.user.profile.password || this.props.user.profile.password.length == 0) {
Alert.alert(
'登录消息',
'请输入密码',
[{text: 'OK'}]
);
return;
}
this.props.actions.login(this.props.user.profile.account,this.props.user.profile.password);
}
... ...