|
|
@@ -14,6 +14,7 @@ import io.reactivex.schedulers.Schedulers;
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.MobileAuthBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.BannerBean;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.LifeplusAPIBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.MemberJoinRequestBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.PolicyBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.PolicyConfirmRequestBean;
|
|
|
@@ -232,8 +233,18 @@ public class SignUpModel extends Model {
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(resultBean -> {
|
|
|
Log.i("APP# SignUpModel | signUp", "|" + resultBean.toPrettyJson());
|
|
|
- saveUserId(resultBean.getData().getUserNo());
|
|
|
- onResult(new Event.Builder(Event.RESULT).integer(Event.MEMBER_JOIN).build());
|
|
|
+ if(resultBean.isSuccess()) {
|
|
|
+ saveUserId(resultBean.getData().getUserNo());
|
|
|
+ onResult(new Event.Builder(Event.RESULT).integer(Event.MEMBER_JOIN).build());
|
|
|
+ }
|
|
|
+ else if(resultBean.getCode() == LifeplusAPIBean.RETURN_MOBILE_AUTH_ERROR_NEED_FOR_30_DAYS){
|
|
|
+ // 탈퇴 30일 회원 구분
|
|
|
+ onResult(new Event.Builder(Event.RESULT).integer(Event.MEMBER_NEED_30DAYS).build());
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // 기타 에러;
|
|
|
+ onResult(new Event.Builder(Event.ERROR).integer(Event.MEMBER_JOIN).string(resultBean.toJson()).build());
|
|
|
+ }
|
|
|
}, e -> {
|
|
|
Log.i("APP# SignUpModel | signUp", "|" + e.getLocalizedMessage());
|
|
|
onResult(new Event.Builder(Event.ERROR).integer(Event.MEMBER_JOIN).string(e.getLocalizedMessage()).build());
|