LCUser.requestPasswordResetBySmsCodeInBackground("+86" + username).subscribe(new Observer<LCNull>() {
public void onSubscribe(Disposable disposable) {
}
public void onNext(LCNull lcNull) {
// 成功调用
((Activity)context).runOnUiThread(new Runnable() {//在UI进程中修改控件状态
@Override
public void run() {
dialog.setMessage("发送成功,请填写验证码并提交。");
}
});
setSendCodeLastTime();
}
public void onError(Throwable throwable) { // 调用出错
print("发送验证码错误:%s", throwable.toString());
((Activity)context).runOnUiThread(new Runnable() {//在UI进程中修改控件状态
@Override
public void run() {
dialog.setMessage("发送错误(2):" + throwable.getMessage());
}
});
setSendCodeLastTime();
}
public void onComplete() {
}
});