diff --git a/src/component/YooLogin.js b/src/component/YooLogin.js
index 2215df7..307b960 100644
--- a/src/component/YooLogin.js
+++ b/src/component/YooLogin.js
@@ -46,13 +46,13 @@ export default class YooLogin extends Component {
})
.then((response) => {
if (/
(.|\n)*用户登录(.|\n)*<\/title>/.test(response)) {
- onFail();
+ onFail('用户名或密码错误');
CookieManager.clearAll();
} else if (/(.|\n)*网络课程(.|\n)*<\/title>/.test(response)) {
this.props.gotoForum();
}
})
- .catch(onFail);
+ .catch(() => onFail('登陆失败'));
}
render() {
diff --git a/src/ui/YooLoginUI.js b/src/ui/YooLoginUI.js
index d3634fc..2bb6132 100644
--- a/src/ui/YooLoginUI.js
+++ b/src/ui/YooLoginUI.js
@@ -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);
}
render() {