浏览代码

[인증][New] 약관 동의 하지 않아도 '번호 요청' 버튼 누를 수 있다. 동의 안했으면 얼럿.

hyodong.min 7 年之前
父节点
当前提交
ebd5837a41

+ 29 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/auth/MobileAuthPresenter.java

@@ -512,9 +512,12 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
       isValidated = false;
     }
 
-    if (verifyAgrees(userBean.getAgreeList()) == false) {
-      isValidated = false;
-    }
+    /**
+     * 약관 동의는 '인증번호 발송' 버튼 표시 여부에 관여하지 않고, 버튼을 눌렀을 때 별도 처리한다.
+     */
+//    if (verifyAgrees(userBean.getAgreeList()) == false) {
+//      isValidated = false;
+//    }
 
     isValidated = isValidated && isAvailableRequestNumberButtonToDisable;
 
@@ -536,6 +539,15 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
     boolean isValidated = verifyRequestNumberValidation(true);
 
     if (isValidated) {
+
+      /**
+       * 약관 동의는 '인증번호 발송' 버튼 표시 여부에 관여하지 않고, 버튼을 눌렀을 때 별도 처리한다.
+       */
+      if (verifyAgrees(userBean.getAgreeList()) == false) {
+        onAgreeFail();
+        return;
+      }
+
       // call api...
       Log.w("APP# MobileAuthPresenter | onAuthorizationNumberSendButtonClick", "|" + "call api ============ ");
 
@@ -568,6 +580,20 @@ public class MobileAuthPresenter implements IMobileAuthContract.Presenter {
     }
   }
 
+  private void onAgreeFail() {
+    showConfirmDialog(R.string.phone_identify_agree_terms, new ICustomDialogListener<AlertDialog>() {
+      @Override
+      public void onDialogResult(AlertDialog dialog, Event event) {
+        if (event.getEventId() == Event.CONFIRM) {
+          dialog.dispose();
+        }
+      }
+
+      @Override
+      public void onDialogCanceled(AlertDialog dialog) { }
+    });
+  }
+
   private void onSendingFail() {
     verifyRequestNumberButton(true);
     view.setEnabledRequestConfirmTextView(false);

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -215,6 +215,7 @@
   <string name="phone_identify_phone_validation">휴대전화 번호 뒤 7~8자리를 입력해주세요</string>
   <string name="phone_identify_phone_validation_limit">1분간 인증번호 발송이 제한됩니다</string>
   <string name="phone_identify_input_time_over">입력 시간이 초과되었습니다.</string>
+  <string name="phone_identify_agree_terms">약관에 동의하여 주십시오.</string>
   <string name="coupon_message">가입 완료 축하 코인 지급 완료</string>
   <string name="coupon_message_from_zumo">가입 완료 축하 코인 지급 완료</string>
   <string name="sign_up_success_message">%s님\nLifeplus 회원가입이 완료되었습니다.</string>