|
@@ -20,6 +20,7 @@ import com.cooleshow.base.utils.SizeUtils;
|
|
|
import com.cooleshow.base.utils.ToastUtil;
|
|
|
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
|
|
|
import com.cooleshow.base.widgets.dialog.CommonConfirmDialog;
|
|
|
+import com.cooleshow.base.widgets.dialog.CommonConfirmDialog2;
|
|
|
import com.cooleshow.base.widgets.dialog.CommonDialog;
|
|
|
import com.cooleshow.base.widgets.dialog.ImgVerifyCodeDialog;
|
|
|
import com.cooleshow.usercenter.R;
|
|
@@ -28,6 +29,7 @@ import com.cooleshow.usercenter.databinding.AcSignOutAccountLayoutBinding;
|
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
|
import com.cooleshow.usercenter.presenter.SignOutAccountPresenter;
|
|
|
import com.cooleshow.usercenter.presenter.contract.SignOutAccountContract;
|
|
|
+import com.cooleshow.usercenter.widget.SignOutFailTipDialog;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
@@ -49,7 +51,9 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
|
|
|
@Override
|
|
|
public void run() {
|
|
|
countTimeValue--;
|
|
|
+
|
|
|
viewBinding.tvSendVerifyCode.setText(countTimeValue + "s");
|
|
|
+ viewBinding.tvSendVerifyCode.setAlpha(0.6f);
|
|
|
viewBinding.tvSendVerifyCode.setClickable(false);
|
|
|
if (countTimeValue < 0) {
|
|
|
resetBt();
|
|
@@ -70,6 +74,8 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
|
|
|
@Override
|
|
|
protected void initView() {
|
|
|
initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "注销账号");
|
|
|
+ boolean tenantAccount = UserHelper.isTenantAccount();
|
|
|
+ viewBinding.ivTip.setImageResource(tenantAccount ? R.drawable.icon_exclamation_mark_tip : R.drawable.icon_exclamation_mark_tip2);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -124,15 +130,18 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
|
|
|
ToastUtil.getInstance().showShort("请输入验证码");
|
|
|
return;
|
|
|
}
|
|
|
- CommonDialog commonConfirmDialog = new CommonDialog(this);
|
|
|
+ CommonConfirmDialog2 commonConfirmDialog = new CommonConfirmDialog2(this);
|
|
|
commonConfirmDialog.show();
|
|
|
- int confirmTextColor = getResources().getColor(com.cooleshow.base.R.color.white);
|
|
|
- commonConfirmDialog.setCancelTextBg("确定", confirmTextColor, StyleConfig.getCoverBtnStyle(this, com.cooleshow.base.R.drawable.sure_btn_bg));
|
|
|
- commonConfirmDialog.setConfirmTextBg("取消", StyleConfig.getMainColor(this), StyleConfig.getBorderNoCoverBtnStyle(this, com.cooleshow.base.R.drawable.cancel_btn_bg));
|
|
|
- commonConfirmDialog.getIvIcon().setBackground(StyleConfig.getCoverBtnStyle(this, com.cooleshow.base.R.drawable.btn_green_stu_line_shape));
|
|
|
+ int cancelTextColor = com.cooleshow.base.R.color.white;
|
|
|
+ int confirmTextColor = com.cooleshow.base.R.color.color_333333;
|
|
|
+ commonConfirmDialog.setCancelBackground(StyleConfig.getCoverBtnStyle(this, com.cooleshow.base.R.drawable.sure_btn_bg), cancelTextColor);
|
|
|
+ commonConfirmDialog.setConfirmBackground(com.cooleshow.base.R.drawable.shape_border_dbdbdb_1dp_22dp, confirmTextColor);
|
|
|
+ commonConfirmDialog.setCancelText("确认");
|
|
|
+ commonConfirmDialog.setConfirmText("取消");
|
|
|
+
|
|
|
|
|
|
- commonConfirmDialog.setTitle("提示");
|
|
|
- commonConfirmDialog.setContent("注销账号后您所有的留存信息将被清空且无法恢复,请谨慎操作");
|
|
|
+ commonConfirmDialog.setTitle("注销账号");
|
|
|
+ commonConfirmDialog.setContent("请确认是否要注销账号?");
|
|
|
commonConfirmDialog.setOnConfirmClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
@@ -211,9 +220,24 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
|
|
|
.navigation();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void signOutAccountError(String errmsg) {
|
|
|
+ if(!checkActivityExist()){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ showErrorTipMsg(errmsg);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void showErrorTipMsg(String errmsg) {
|
|
|
+ SignOutFailTipDialog dialog =new SignOutFailTipDialog(this);
|
|
|
+ dialog.show();
|
|
|
+ dialog.setContent(errmsg);
|
|
|
+ }
|
|
|
+
|
|
|
private void resetBt() {
|
|
|
viewBinding.tvSendVerifyCode.setClickable(true);
|
|
|
viewBinding.tvSendVerifyCode.setText("获取验证码");
|
|
|
+ viewBinding.tvSendVerifyCode.setAlpha(1.0f);
|
|
|
}
|
|
|
|
|
|
@Override
|