@ -46,13 +46,13 @@ export default class YooLogin extends Component {
})
.then((response) => {
if (/<title>(.|\n)*用户登录(.|\n)*<\/title>/.test(response)) {
onFail();
onFail('用户名或密码错误');
CookieManager.clearAll();
} else if (/<title>(.|\n)*网络课程(.|\n)*<\/title>/.test(response)) {
this.props.gotoForum();
}
.catch(onFail);
.catch(() => onFail('登陆失败'));
render() {
@ -63,9 +63,9 @@ export default class YooLoginUI extends Component {
onLoginFailed() {
onLoginFailed(hint) {
this.setState({loading: false});
ToastAndroid.show('登录失败', ToastAndroid.SHORT);
ToastAndroid.show(hint, ToastAndroid.SHORT);