Kaynağa Gözat

修改酷乐秀项目短信验证码流程

Pq 1 yıl önce
ebeveyn
işleme
f748ce601a
18 değiştirilmiş dosya ile 123 ekleme ve 58 silme
  1. 7 0
      BaseLibrary/src/main/java/com/cooleshow/base/widgets/dialog/ImgVerifyCodeDialog.java
  2. 1 0
      BaseLibrary/src/main/res/layout/dialog_img_verify_code_layout.xml
  3. 13 4
      student/src/main/java/com/cooleshow/student/ui/mine/ModifyPasswordActivity.java
  4. 8 6
      student/src/main/java/com/cooleshow/student/ui/mine/ModifyPhoneNumActivity.java
  5. 1 0
      teacher/build.gradle
  6. 2 2
      teacher/src/main/java/com/cooleshow/teacher/presenter/mine/UnbindTenantPresenter.java
  7. 2 2
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/InputBankVCodeActivity.java
  8. 6 5
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPasswordActivity.java
  9. 6 5
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPhoneNumActivity.java
  10. 3 2
      teacher/src/main/java/com/cooleshow/teacher/ui/mine/UnBindTenantActivity.java
  11. 4 2
      usercenter/src/main/java/com/cooleshow/usercenter/data/api/UserApi.kt
  12. 7 7
      usercenter/src/main/java/com/cooleshow/usercenter/presenter/SignOutAccountPresenter.java
  13. 7 7
      usercenter/src/main/java/com/cooleshow/usercenter/presenter/VerifyLoginPresenter.java
  14. 1 1
      usercenter/src/main/java/com/cooleshow/usercenter/presenter/contract/VerifyLoginContract.java
  15. 27 5
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java
  16. 12 4
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/ForgetPasswordActivity.java
  17. 12 2
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/ModifyPasswordActivity.java
  18. 4 4
      usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/SignOutAccountActivity.java

+ 7 - 0
BaseLibrary/src/main/java/com/cooleshow/base/widgets/dialog/ImgVerifyCodeDialog.java

@@ -17,6 +17,7 @@ import com.bumptech.glide.request.RequestOptions;
 import com.cooleshow.base.BuildConfig;
 import com.cooleshow.base.R;
 import com.cooleshow.base.common.BaseConstant;
+import com.cooleshow.base.utils.KeyboardUtils;
 import com.cooleshow.base.utils.LogUtils;
 
 import androidx.annotation.NonNull;
@@ -91,6 +92,12 @@ public class ImgVerifyCodeDialog extends Dialog {
         if (mIvIcon != null) {
             this.currentPhone = phone;
             loadImg();
+            etCode.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    KeyboardUtils.showSoftInput(etCode);
+                }
+            },100);
         }
     }
 

+ 1 - 0
BaseLibrary/src/main/res/layout/dialog_img_verify_code_layout.xml

@@ -37,6 +37,7 @@
             app:layout_constraintTop_toTopOf="parent" />
 
         <EditText
+            android:maxLength="4"
             android:id="@+id/et_code"
             android:layout_width="@dimen/dp_150"
             android:layout_height="@dimen/dp_45"

+ 13 - 4
student/src/main/java/com/cooleshow/student/ui/mine/ModifyPasswordActivity.java

@@ -94,7 +94,7 @@ public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswo
         String cPhone = phoneNum.substring(0, 3) + "****" + phoneNum.substring(7, phoneNum.length());
         viewBinding.tvPhone.setText(cPhone);
 
-        IMThemManager.getInstance().setEditStyle(viewBinding.etAuthCode,viewBinding.etPassword);
+        IMThemManager.getInstance().setEditStyle(viewBinding.etAuthCode, viewBinding.etPassword);
     }
 
 
@@ -109,9 +109,7 @@ public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswo
         mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
-                if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
-                }
+                toSendSmsCode(phone, imgCode);
             }
         });
     }
@@ -148,9 +146,20 @@ public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswo
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
+//        Map<String, String> map = new HashMap<>();
+//        map.put("mobile", phone);
+//        map.put("type", "PASSWD");
+//        presenter.sendSmsCode(map);
+    }
+
+    private void toSendSmsCode(String phone, String imgCode) {
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String, String> map = new HashMap<>();
         map.put("mobile", phone);
         map.put("type", "PASSWD");
+        map.put("code", imgCode);
         presenter.sendSmsCode(map);
     }
 

+ 8 - 6
student/src/main/java/com/cooleshow/student/ui/mine/ModifyPhoneNumActivity.java

@@ -93,7 +93,7 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "新手机号绑定");
         viewBinding.tvGetAuthCode.setOnClickListener(this);
         viewBinding.tvSave.setOnClickListener(this);
-        IMThemManager.getInstance().setEditStyle(viewBinding.etPhoneNum,viewBinding.etAuthCode);
+        IMThemManager.getInstance().setEditStyle(viewBinding.etPhoneNum, viewBinding.etAuthCode);
     }
 
     private void showImgVerifyCodeDialog(String phone) {
@@ -107,9 +107,7 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
-                if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
-                }
+                sendSmsCode(phone, imgCode);
             }
         });
     }
@@ -142,7 +140,7 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
-        sendSmsCode(phone);
+//        sendSmsCode(phone);
     }
 
     @Override
@@ -150,10 +148,14 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         getCodeSuccess();
     }
 
-    private void sendSmsCode(String phone) {
+    private void sendSmsCode(String phone, String imgCode) {
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String, String> jsonObject = new HashMap<>();
         jsonObject.put("mobile", phone);
         jsonObject.put("type", "PHONE");
+        jsonObject.put("code", imgCode);
         presenter.sendSmsCode(jsonObject);
     }
 

+ 1 - 0
teacher/build.gradle

@@ -133,6 +133,7 @@ dependencies {
     implementation project(path: ':tclive')
     implementation project(path: ':classRoom')
     implementation project(path: ':musicMerge')
+    implementation project(path: ':accompany')
     implementation "com.alibaba:arouter-api:$rootProject.ext.android.arouter_api_version"
     kapt "com.alibaba:arouter-compiler:$rootProject.ext.android.arouter_api_version"
 

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/presenter/mine/UnbindTenantPresenter.java

@@ -49,9 +49,9 @@ public class UnbindTenantPresenter extends BasePresenter<UnbindTenantContract.Vi
         });
     }
 
-    public void sendSmsCode(String mobile) {
+    public void sendSmsCode(String mobile,String imgCode) {
         getView().showLoading();
-        addSubscribe(create(UserApi.class).sendSmsCode(mobile, UserConstants.SEND_VERIFY_CODE_TYPE_UNBIND_TENANT), new BaseObserver<Object>(getView()) {
+        addSubscribe(create(UserApi.class).sendSmsCode(mobile, imgCode,UserConstants.SEND_VERIFY_CODE_TYPE_UNBIND_TENANT), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/mine/InputBankVCodeActivity.java

@@ -53,13 +53,13 @@ public class InputBankVCodeActivity extends BaseMVPActivity<ActivityInputBankVco
     @Override
     public void initData() {
         super.initData();
-        sendVcode();
     }
 
-    private void sendVcode() {
+    private void sendVcode(String imgCode) {
         Map<String,String> jsonObject = new HashMap<>();
         jsonObject.put("mobile", phone);
         jsonObject.put("type", "BANK");
+        jsonObject.put("code", imgCode);
         presenter.sendSmsCode(jsonObject);
     }
 

+ 6 - 5
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPasswordActivity.java

@@ -90,17 +90,19 @@ public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswo
         mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
-                if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
-                }
+                sendVerifyCode(phone, imgCode);
             }
         });
     }
 
-    private void sendVerifyCode(String phone) {
+    private void sendVerifyCode(String phone,String imgCode) {
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String,String> jsonObject = new HashMap<>();
         jsonObject.put("mobile", phone);
         jsonObject.put("type", "PASSWD");
+        jsonObject.put("code", imgCode);
         presenter.sendSmsCode(jsonObject);
     }
 
@@ -157,7 +159,6 @@ public class ModifyPasswordActivity extends BaseMVPActivity<ActivityModifyPasswo
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
-        sendVerifyCode(phone);
     }
 
 

+ 6 - 5
teacher/src/main/java/com/cooleshow/teacher/ui/mine/ModifyPhoneNumActivity.java

@@ -103,9 +103,7 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
-                if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
-                }
+                sendSmsCode(phone, imgCode);
             }
         });
     }
@@ -138,13 +136,16 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
-        sendSmsCode(phone);
     }
 
-    private void sendSmsCode(String phone) {
+    private void sendSmsCode(String phone, String imgCode) {
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String, String> jsonObject = new HashMap<>();
         jsonObject.put("mobile", phone);
         jsonObject.put("type", "PHONE");
+        jsonObject.put("code", imgCode);
         presenter.sendSmsCode(jsonObject);
     }
 

+ 3 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/mine/UnBindTenantActivity.java

@@ -112,7 +112,8 @@ public class UnBindTenantActivity extends BaseMVPActivity<AcUnbindTenantLayoutBi
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
                 if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
+                    mImgVerifyCodeDialog.dismiss();
+                    presenter.sendSmsCode(mPhoneNum,imgCode);
                 }
             }
         });
@@ -144,7 +145,7 @@ public class UnBindTenantActivity extends BaseMVPActivity<AcUnbindTenantLayoutBi
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
-        presenter.sendSmsCode(mPhoneNum);
+
     }
 
     @Override

+ 4 - 2
usercenter/src/main/java/com/cooleshow/usercenter/data/api/UserApi.kt

@@ -39,7 +39,8 @@ interface UserApi {
     @POST(BaseConstant.TEACHER_GROUP + "code/sendSmsCode")
     fun sendSmsCode(
         @Field("mobile") mobile: String,
-        @Field("type") type: String
+        @Field("code") imgCode: String,
+        @Field("type") type: String,
     ): Observable<BaseResponse<Object>>
 
 
@@ -50,7 +51,8 @@ interface UserApi {
     @POST(BaseConstant.STUDENT_GROUP + "code/sendSmsCode")
     fun sendSmsCodeForStu(
         @Field("mobile") mobile: String,
-        @Field("type") type: String
+        @Field("code") imgCode: String,
+        @Field("type") type: String,
     ): Observable<BaseResponse<Object>>
 
     /*

+ 7 - 7
usercenter/src/main/java/com/cooleshow/usercenter/presenter/SignOutAccountPresenter.java

@@ -28,12 +28,12 @@ import java.util.Map;
  */
 public class SignOutAccountPresenter extends BasePresenter<SignOutAccountContract.SignOutAccountView> implements SignOutAccountContract.Presenter {
 
-    public void sendSmsCode(String mobile) {
+    public void sendSmsCode(String mobile,String imgCode) {
         getView().showLoading();
         if (BaseApplication.Companion.isTeacherClient()) {
-            sendVerifyCodeForTeacher(mobile);
+            sendVerifyCodeForTeacher(mobile,imgCode);
         } else {
-            sendVerifyCodeForStu(mobile);
+            sendVerifyCodeForStu(mobile,imgCode);
         }
     }
 
@@ -43,8 +43,8 @@ public class SignOutAccountPresenter extends BasePresenter<SignOutAccountContrac
      *
      * @param mobile
      */
-    private void sendVerifyCodeForStu(String mobile) {
-        addSubscribe(create(UserApi.class).sendSmsCodeForStu(mobile, UserConstants.SEND_VERIFY_CODE_TYPE_LOGOFF), new BaseObserver<Object>(getView()) {
+    private void sendVerifyCodeForStu(String mobile,String imgCode) {
+        addSubscribe(create(UserApi.class).sendSmsCodeForStu(mobile,imgCode, UserConstants.SEND_VERIFY_CODE_TYPE_LOGOFF), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {
@@ -67,8 +67,8 @@ public class SignOutAccountPresenter extends BasePresenter<SignOutAccountContrac
      *
      * @param mobile
      */
-    private void sendVerifyCodeForTeacher(String mobile) {
-        addSubscribe(create(UserApi.class).sendSmsCode(mobile, UserConstants.SEND_VERIFY_CODE_TYPE_LOGOFF), new BaseObserver<Object>(getView()) {
+    private void sendVerifyCodeForTeacher(String mobile,String imgCode) {
+        addSubscribe(create(UserApi.class).sendSmsCode(mobile,imgCode, UserConstants.SEND_VERIFY_CODE_TYPE_LOGOFF), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {

+ 7 - 7
usercenter/src/main/java/com/cooleshow/usercenter/presenter/VerifyLoginPresenter.java

@@ -30,14 +30,14 @@ import java.util.Map;
 public class VerifyLoginPresenter extends BasePresenter<VerifyLoginContract.VerifyLoginView> implements VerifyLoginContract.Presenter {
 
     @Override
-    public void sendVerifyCode(String mobile) {
+    public void sendVerifyCode(String mobile,String imgCode) {
         if (getView() != null) {
             getView().showLoading();
         }
         if (BaseApplication.Companion.isTeacherClient()) {
-            sendVerifyCodeForTeacher(mobile);
+            sendVerifyCodeForTeacher(mobile,imgCode);
         } else {
-            sendVerifyCodeForStu(mobile);
+            sendVerifyCodeForStu(mobile,imgCode);
         }
     }
 
@@ -47,8 +47,8 @@ public class VerifyLoginPresenter extends BasePresenter<VerifyLoginContract.Veri
      *
      * @param mobile
      */
-    private void sendVerifyCodeForStu(String mobile) {
-        addSubscribe(create(UserApi.class).sendSmsCodeForStu(mobile, UserConstants.SEND_VERIFY_CODE_TYPE_LOGIN), new BaseObserver<Object>(getView()) {
+    private void sendVerifyCodeForStu(String mobile,String imgCode) {
+        addSubscribe(create(UserApi.class).sendSmsCodeForStu(mobile,imgCode, UserConstants.SEND_VERIFY_CODE_TYPE_LOGIN), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {
@@ -76,8 +76,8 @@ public class VerifyLoginPresenter extends BasePresenter<VerifyLoginContract.Veri
      *
      * @param mobile
      */
-    private void sendVerifyCodeForTeacher(String mobile) {
-        addSubscribe(create(UserApi.class).sendSmsCode(mobile, UserConstants.SEND_VERIFY_CODE_TYPE_LOGIN), new BaseObserver<Object>(getView()) {
+    private void sendVerifyCodeForTeacher(String mobile,String imgCode) {
+        addSubscribe(create(UserApi.class).sendSmsCode(mobile, imgCode,UserConstants.SEND_VERIFY_CODE_TYPE_LOGIN), new BaseObserver<Object>(getView()) {
             @Override
             protected void onSuccess(Object data) {
                 if (getView() != null) {

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/presenter/contract/VerifyLoginContract.java

@@ -15,7 +15,7 @@ public interface VerifyLoginContract {
     }
 
     interface Presenter {
-        void sendVerifyCode(String mobile);
+        void sendVerifyCode(String mobile,String imgCode);
     }
 
 }

+ 27 - 5
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/VerifyCodeInputActivity.java

@@ -18,6 +18,7 @@ import com.cooleshow.base.utils.ToastUtils;
 import com.cooleshow.base.utils.Utils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.base.widgets.VerifyEditText;
+import com.cooleshow.base.widgets.dialog.ImgVerifyCodeDialog;
 import com.cooleshow.usercenter.R;
 import com.cooleshow.usercenter.bean.UserInfo;
 import com.cooleshow.usercenter.bean.UserLoginInfo;
@@ -56,6 +57,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
             switchSendCodeButton(true);
         }
     };
+    private ImgVerifyCodeDialog mImgVerifyCodeDialog;
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -82,7 +84,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
         }
         SpannableString string = Utils.diffColorString(getString(R.string.verify_input_phone_tip), mPhoneNum, getResources().getColor(R.color.black), getResources().getColor(com.cooleshow.base.R.color.color_999999));
         viewBinding.tvTipTargetPhone.setText(string);
-        switchSendCodeButton(false);
+        switchSendCodeButton(true);
         viewBinding.ivBack.setOnClickListener(this);
         viewBinding.tvResendCode.setOnClickListener(this);
         viewBinding.editCode.addInputCompleteListener(new VerifyEditText.InputCompleteListener() {
@@ -120,12 +122,32 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
     @Override
     public void initData() {
         super.initData();
-        sendVerifyCode();
+        showImgVerifyCodeDialog();
     }
 
-    private void sendVerifyCode() {
+
+    private void showImgVerifyCodeDialog() {
+        if (mImgVerifyCodeDialog == null) {
+            mImgVerifyCodeDialog = new ImgVerifyCodeDialog(VerifyCodeInputActivity.this);
+        }
+        if (!mImgVerifyCodeDialog.isShowing()) {
+            mImgVerifyCodeDialog.show();
+        }
+        mImgVerifyCodeDialog.setPhone(mPhoneNum);
+        mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
+            @Override
+            public void onVerifyImgCode(String phone, String imgCode) {
+                sendVerifyCode(imgCode);
+            }
+        });
+    }
+
+    private void sendVerifyCode(String imgCode) {
         if (presenter != null && !TextUtils.isEmpty(mPhoneNum)) {
-            presenter.sendVerifyCode(mPhoneNum);
+            if (mImgVerifyCodeDialog != null) {
+                mImgVerifyCodeDialog.dismiss();
+            }
+            presenter.sendVerifyCode(mPhoneNum, imgCode);
         }
     }
 
@@ -164,7 +186,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
         }
         if (v.getId() == R.id.tv_resend_code) {
             //重新发送
-            sendVerifyCode();
+            showImgVerifyCodeDialog();
         }
     }
 

+ 12 - 4
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/ForgetPasswordActivity.java

@@ -124,9 +124,7 @@ public class ForgetPasswordActivity extends BaseMVPActivity<AcForgetPwdLayoutBin
         mImgVerifyCodeDialog.setOnEventListener(new ImgVerifyCodeDialog.OnEventListener() {
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
-                if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
-                }
+                toSendSms(phone, imgCode);
             }
         });
     }
@@ -150,10 +148,20 @@ public class ForgetPasswordActivity extends BaseMVPActivity<AcForgetPwdLayoutBin
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
+
+    }
+
+    private void toSendSms(String phone, String imgCode) {
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String, String> map = new HashMap<>();
         map.put("mobile", phone);
         map.put("type", "PASSWD");
-        presenter.sendSmsCode(map);
+        map.put("code", imgCode);
+        if (presenter != null) {
+            presenter.sendSmsCode(map);
+        }
     }
 
     @Override

+ 12 - 2
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/ModifyPasswordActivity.java

@@ -129,7 +129,7 @@ public class ModifyPasswordActivity extends BaseMVPActivity<AcModifyPasswordBind
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
                 if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
+                    toSendSms(phone,imgCode);
                 }
             }
         });
@@ -167,10 +167,20 @@ public class ModifyPasswordActivity extends BaseMVPActivity<AcModifyPasswordBind
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
+
+    }
+
+    private void toSendSms(String phone,String imgCode){
+        if (mImgVerifyCodeDialog != null) {
+            mImgVerifyCodeDialog.dismiss();
+        }
         Map<String, String> map = new HashMap<>();
         map.put("mobile", phone);
         map.put("type", "PASSWD");
-        presenter.sendSmsCode(map);
+        map.put("code", imgCode);
+        if (presenter != null) {
+            presenter.sendSmsCode(map);
+        }
     }
 
 

+ 4 - 4
usercenter/src/main/java/com/cooleshow/usercenter/ui/activity/setting/SignOutAccountActivity.java

@@ -127,8 +127,8 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
         CommonDialog commonConfirmDialog = new CommonDialog(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.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));
 
         commonConfirmDialog.setTitle("提示");
@@ -161,7 +161,8 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
             @Override
             public void onVerifyImgCode(String phone, String imgCode) {
                 if (presenter != null) {
-                    presenter.verifyImgCode(phone, imgCode);
+                    mImgVerifyCodeDialog.dismiss();
+                    presenter.sendSmsCode(mPhoneNum, imgCode);
                 }
             }
         });
@@ -200,7 +201,6 @@ public class SignOutAccountActivity extends BaseMVPActivity<AcSignOutAccountLayo
         if (mImgVerifyCodeDialog != null) {
             mImgVerifyCodeDialog.dismiss();
         }
-        presenter.sendSmsCode(mPhoneNum);
     }
 
     @Override