|
@@ -10,17 +10,13 @@ import android.widget.TextView;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
import com.sheep.gamegroup.di.components.DaggerRealNameAutherComponent;
|
|
import com.sheep.gamegroup.di.components.DaggerRealNameAutherComponent;
|
|
|
import com.sheep.gamegroup.di.modules.RealNameAutherModule;
|
|
import com.sheep.gamegroup.di.modules.RealNameAutherModule;
|
|
|
-import com.sheep.gamegroup.event.RealNameAutehrChange;
|
|
|
|
|
-import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
-import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
|
|
import com.sheep.gamegroup.presenter.RealNameAutherContract;
|
|
import com.sheep.gamegroup.presenter.RealNameAutherContract;
|
|
|
import com.sheep.gamegroup.presenter.RealNameAutherPresenter;
|
|
import com.sheep.gamegroup.presenter.RealNameAutherPresenter;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.DataUtil;
|
|
import com.sheep.gamegroup.util.DataUtil;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
-import com.sheep.gamegroup.util.MyDbManager;
|
|
|
|
|
import com.sheep.gamegroup.util.StringUtils;
|
|
import com.sheep.gamegroup.util.StringUtils;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
@@ -30,8 +26,6 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
|
|
-import org.greenrobot.eventbus.EventBus;
|
|
|
|
|
-
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.Locale;
|
|
import java.util.Locale;
|
|
|
|
|
|
|
@@ -39,9 +33,7 @@ import javax.inject.Inject;
|
|
|
|
|
|
|
|
import butterknife.BindView;
|
|
import butterknife.BindView;
|
|
|
import butterknife.OnClick;
|
|
import butterknife.OnClick;
|
|
|
-import rx.android.schedulers.AndroidSchedulers;
|
|
|
|
|
import rx.functions.Action1;
|
|
import rx.functions.Action1;
|
|
|
-import rx.schedulers.Schedulers;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Created by Administrator on 2018/3/26.
|
|
* Created by Administrator on 2018/3/26.
|
|
@@ -83,7 +75,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
@Override
|
|
@Override
|
|
|
public void initListener() {
|
|
public void initListener() {
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ public static final int MAX_COUNT = 2;//修改为只验证身份证与姓名
|
|
|
@Override
|
|
@Override
|
|
|
public void initData() {
|
|
public void initData() {
|
|
|
DaggerRealNameAutherComponent.builder().netComponent(SheepApp.get(this).getNetComponent()).realNameAutherModule(new RealNameAutherModule(this)).build().inject(this);
|
|
DaggerRealNameAutherComponent.builder().netComponent(SheepApp.get(this).getNetComponent()).realNameAutherModule(new RealNameAutherModule(this)).build().inject(this);
|
|
@@ -97,7 +89,6 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
if (i != null && i.hasExtra("info")) {
|
|
if (i != null && i.hasExtra("info")) {
|
|
|
whereFrom = i.getIntExtra("where_from", 0);
|
|
whereFrom = i.getIntExtra("where_from", 0);
|
|
|
}
|
|
}
|
|
|
- showProgress();
|
|
|
|
|
tvSubmit.setVisibility(View.GONE);
|
|
tvSubmit.setVisibility(View.GONE);
|
|
|
userEntity = DataUtil.getInstance().getUserEntity();
|
|
userEntity = DataUtil.getInstance().getUserEntity();
|
|
|
if(userEntity != null){
|
|
if(userEntity != null){
|
|
@@ -122,7 +113,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
count = count + 1;
|
|
count = count + 1;
|
|
|
et_bank_mobile.setEnabled(false);
|
|
et_bank_mobile.setEnabled(false);
|
|
|
}
|
|
}
|
|
|
- if (count >= 4) {
|
|
|
|
|
|
|
+ if (count >= MAX_COUNT) {
|
|
|
tvSubmit.setVisibility(View.GONE);
|
|
tvSubmit.setVisibility(View.GONE);
|
|
|
} else {
|
|
} else {
|
|
|
tvSubmit.setVisibility(View.VISIBLE);
|
|
tvSubmit.setVisibility(View.VISIBLE);
|
|
@@ -140,27 +131,13 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
public void NetSuccess(int code, String msg, String string) {
|
|
public void NetSuccess(int code, String msg, String string) {
|
|
|
hideProgress();
|
|
hideProgress();
|
|
|
G.showToast(msg);
|
|
G.showToast(msg);
|
|
|
- RealNameAutehrChange change = new RealNameAutehrChange();
|
|
|
|
|
- for (String key : map.keySet()) {
|
|
|
|
|
- if (key.equals("real_name") && !TextUtils.isEmpty(map.get(key))) {
|
|
|
|
|
- change.setRealName(map.get(key));
|
|
|
|
|
- }
|
|
|
|
|
- if (key.equals("id_number") && !TextUtils.isEmpty(map.get(key))) {
|
|
|
|
|
- change.setIdCard(map.get(key));
|
|
|
|
|
- }
|
|
|
|
|
- if (key.equals("bank_card") && !TextUtils.isEmpty(map.get(key))) {
|
|
|
|
|
- change.setBanck(map.get(key));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- EventBus.getDefault().post(change);
|
|
|
|
|
updateUserInfo(new Action1<UserEntity>() {
|
|
updateUserInfo(new Action1<UserEntity>() {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void call(UserEntity result) {
|
|
public void call(UserEntity result) {
|
|
|
if (result != null)
|
|
if (result != null)
|
|
|
userEntity = result;
|
|
userEntity = result;
|
|
|
- if (whereFrom == 1) {
|
|
|
|
|
|
|
+ if (whereFrom == 1) {//从提现过来的
|
|
|
Jump2View.getInstance().goWithdrawal(RealNameAuthenAct.this);
|
|
Jump2View.getInstance().goWithdrawal(RealNameAuthenAct.this);
|
|
|
}
|
|
}
|
|
|
finish();
|
|
finish();
|
|
@@ -222,13 +199,17 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
} else if (TextUtils.isEmpty((idNumber = etIdCard.getText().toString()))) {
|
|
} else if (TextUtils.isEmpty((idNumber = etIdCard.getText().toString()))) {
|
|
|
G.showToast("身份证不能为空");
|
|
G.showToast("身份证不能为空");
|
|
|
return;
|
|
return;
|
|
|
- } else if (TextUtils.isEmpty((bankCard = etBank.getText().toString()))) {
|
|
|
|
|
|
|
+ } else if (MAX_COUNT >= 4 && TextUtils.isEmpty((bankCard = etBank.getText().toString()))) {
|
|
|
G.showToast("银行卡号不能为空");
|
|
G.showToast("银行卡号不能为空");
|
|
|
return;
|
|
return;
|
|
|
- } else if (TextUtils.isEmpty((bankCardMobile = et_bank_mobile.getText().toString()))) {
|
|
|
|
|
|
|
+ } else if (MAX_COUNT >= 4 && TextUtils.isEmpty((bankCardMobile = et_bank_mobile.getText().toString()))) {
|
|
|
G.showToast("银行行预留手机号不能为空");
|
|
G.showToast("银行行预留手机号不能为空");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!StringUtils.isChinese(realName)) {
|
|
|
|
|
+ G.showToast("姓名必须是基本汉字!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
map.put("real_name", realName);
|
|
map.put("real_name", realName);
|
|
|
|
|
|
|
|
String str = StringUtils.IDCardValidate(idNumber);
|
|
String str = StringUtils.IDCardValidate(idNumber);
|
|
@@ -237,18 +218,19 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
map.put("id_number", idNumber);
|
|
map.put("id_number", idNumber);
|
|
|
|
|
+ if (MAX_COUNT >= 4) {
|
|
|
|
|
+ if (!StringUtils.checkBankCard(bankCard)) {
|
|
|
|
|
+ G.showToast("银行卡不合法哈!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ map.put("bank_card", bankCard);
|
|
|
|
|
|
|
|
- if (!StringUtils.checkBankCard(bankCard)) {
|
|
|
|
|
- G.showToast("银行卡不合法哈!");
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- map.put("bank_card", bankCard);
|
|
|
|
|
-
|
|
|
|
|
- if (!StringUtils.isMobile(bankCardMobile)) {
|
|
|
|
|
- G.showToast("银行卡预留手机号不合法哈!");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if (!StringUtils.isMobile(bankCardMobile)) {
|
|
|
|
|
+ G.showToast("银行卡预留手机号不合法哈!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ map.put("bank_card_mobile", bankCardMobile);
|
|
|
}
|
|
}
|
|
|
- map.put("bank_card_mobile", bankCardMobile);
|
|
|
|
|
|
|
|
|
|
ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA, "你已执行%d次实名认证操作", userEntity.getCertification_count()))
|
|
ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA, "你已执行%d次实名认证操作", userEntity.getCertification_count()))
|
|
|
.setMsg("实名认证首次免费。请务必确认您所提交的认证信息真实有效。若因信息填写错误造成认证失败。再次申请认证时需扣除您0.5绵羊币/次作为认证费用,请务必谨慎填写认证信息。")
|
|
.setMsg("实名认证首次免费。请务必确认您所提交的认证信息真实有效。若因信息填写错误造成认证失败。再次申请认证时需扣除您0.5绵羊币/次作为认证费用,请务必谨慎填写认证信息。")
|