private void Query(String username, String userword, String identity) {
AVQuery<AVUser> query = AVUser.getQuery();
query.whereEqualTo("username", username);
query.whereEqualTo("email", userword);
query.whereEqualTo("identity", identity);
query.findInBackground().subscribe(new Observer<List<AVUser>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull List<AVUser> avUsers) {
Log.e(TAG, "onNext: " + avUsers.size());
if (avUsers.size() == 1) {
//发送重置邮件
AVUser.requestPasswordResetInBackground(userword).blockingSubscribe();
Toast.makeText(LoginForgetActivity.this, "重置密码邮件已发往您的邮箱,请前往查收!", Toast.LENGTH_SHORT).show();
startActivity(new Intent(LoginForgetActivity.this, LoginActivity.class));
finish();
Log.e(TAG, "重置密码成功");
} else {
etLoginForgetUserword.setText("");
etLoginForgetUsername.setText("");
rbForgetAuthor.setChecked(false);
rbForgetReaders.setChecked(false);
etLoginForgetUsername.requestFocus();
Toast.makeText(LoginForgetActivity.this, "查询不到相关用户,请重新填写信息!", Toast.LENGTH_SHORT).show();
Log.e(TAG, "查询不到用户");
}
}
@Override
public void onError(@NonNull Throwable e) {
Log.e(TAG, "查询出错:" + e.getMessage());
}
@Override
public void onComplete() {
}
});
}
邮件确实是发送出来了
但它又确实是无响应了
只要把重置邮件的那行注释掉就不会出错
有遇到过解决了的大佬么,救救啊