区号逻辑修改

This commit is contained in:
wushaocheng
2022-12-01 01:56:21 +08:00
parent 90194803d7
commit a30bda4814
8 changed files with 233 additions and 426 deletions

View File

@@ -20,6 +20,7 @@ import com.netease.nimlib.sdk.msg.MsgService;
import com.orhanobut.logger.Logger;
import com.yizhuan.xchat_android_core.DemoCache;
import com.yizhuan.xchat_android_core.R;
import com.yizhuan.xchat_android_core.auth.bean.AreaInfoBean;
import com.yizhuan.xchat_android_core.auth.entity.AccountInfo;
import com.yizhuan.xchat_android_core.auth.entity.ThirdUserInfo;
import com.yizhuan.xchat_android_core.auth.entity.TicketInfo;
@@ -56,6 +57,7 @@ import com.yizhuan.xchat_android_library.utils.json.JsonUtils;
import org.greenrobot.eventbus.EventBus;
import java.util.HashMap;
import java.util.List;
import cn.sharesdk.facebook.Facebook;
import cn.sharesdk.framework.Platform;
@@ -1040,6 +1042,17 @@ public class AuthModel extends BaseModel implements IAuthModel {
.compose(RxHelper.handleSchedulers());
}
/**
* 区号
*
* @return
*/
public Single<List<AreaInfoBean>> getAreaCodeList() {
return api.getAreaCodeList()
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers());
}
/**
* 发送验证码
*
@@ -1334,6 +1347,14 @@ public class AuthModel extends BaseModel implements IAuthModel {
@POST("phone/auth/bound")
Single<ServiceResult<String>> boundAuthCode(@Field("phoneAreaCode") String phoneAreaCode);
/**
* 获取地区码
*
* @return
*/
@GET("areaInfo/list")
Single<ServiceResult<List<AreaInfoBean>>> getAreaCodeList();
/**
* 发送验证码
*

View File

@@ -0,0 +1,15 @@
package com.yizhuan.xchat_android_core.auth.bean
import lombok.Data
@Data
class AreaInfoBean(
val id: Long = 0L,
val name: String? = null,
val abbr: String? = null,
val phoneAreaCode: String? = null,
val seq: Int = 0,
val status: Int = 0,
val createTime: Long = 0L,
val updateTime: Long = 0L
)