diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java b/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java index 7abd7ee10..f06c3d707 100644 --- a/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java +++ b/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java @@ -263,10 +263,10 @@ public class AuthModel extends BaseModel implements IAuthModel { //获取登录信息 try { LoginResult loginResult = api.login( - account, + DESUtils.DESAndBase64(account), VersionUtil.getLocalName(BasicConfig.INSTANCE.getAppContext()), "erban-client", - account, + DESUtils.DESAndBase64(account), DESAndBase64(password), "password", "uyzjdhds", @@ -712,7 +712,7 @@ public class AuthModel extends BaseModel implements IAuthModel { public void subscribe(SingleEmitter emitter) throws Exception { try { ServiceResult serviceResult = api.requestSMSCode( - phone, + DESUtils.DESAndBase64(phone), String.valueOf(type) ).blockingGet(); if (!serviceResult.isSuccess()) { @@ -743,7 +743,7 @@ public class AuthModel extends BaseModel implements IAuthModel { public void subscribe(SingleEmitter e) throws Exception { try { ServiceResult serviceResult = api.requestResetPsw( - phone, + DESUtils.DESAndBase64(phone), sms_code, DESAndBase64(newPsw) ).blockingGet(); @@ -805,7 +805,7 @@ public class AuthModel extends BaseModel implements IAuthModel { } return api.bindPhone( String.valueOf(currentAccountInfo.getUid()), - phone, + DESUtils.DESAndBase64(phone), code, getTicket() ) @@ -872,7 +872,7 @@ public class AuthModel extends BaseModel implements IAuthModel { linkedmeChannel = linkedInfo.getChannel(); } return api.register( - phone, + DESUtils.DESAndBase64(phone), sms_code, verifyCode, DESAndBase64(password), @@ -962,7 +962,7 @@ public class AuthModel extends BaseModel implements IAuthModel { return Single.error(new Throwable("没有ticket信息")); } return api.changeLoginPwd( - phone, + DESUtils.DESAndBase64(phone), oldPwd, newPwd, getTicket() @@ -1000,7 +1000,7 @@ public class AuthModel extends BaseModel implements IAuthModel { } return api.setLoginPwd( - phone, + DESUtils.DESAndBase64(phone), newPwd, String.valueOf(getCurrentUid()), getTicket() @@ -1168,7 +1168,7 @@ public class AuthModel extends BaseModel implements IAuthModel { * @return */ public Single sendLoginCode(String phone, int type) { - return api.sendCode(phone, String.valueOf(type)) + return api.sendCode(DESUtils.DESAndBase64(phone), String.valueOf(type)) .subscribeOn(Schedulers.io()) .map(objectServiceResult -> { if (!objectServiceResult.isSuccess()) { diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/pay/PayModel.java b/core/src/main/java/com/yizhuan/xchat_android_core/pay/PayModel.java index da7057186..6c1e9e331 100644 --- a/core/src/main/java/com/yizhuan/xchat_android_core/pay/PayModel.java +++ b/core/src/main/java/com/yizhuan/xchat_android_core/pay/PayModel.java @@ -1,18 +1,18 @@ package com.yizhuan.xchat_android_core.pay; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_ACCOUNT; + import android.content.Context; import com.alibaba.fastjson.JSONObject; import com.google.gson.JsonObject; import com.yizhuan.xchat_android_core.auth.AuthModel; -import com.yizhuan.xchat_android_core.auth.event.LoginEvent; import com.yizhuan.xchat_android_core.base.BaseModel; import com.yizhuan.xchat_android_core.bean.response.ServiceResult; import com.yizhuan.xchat_android_core.bean.response.result.ChargeListResult; import com.yizhuan.xchat_android_core.bean.response.result.WalletInfoResult; import com.yizhuan.xchat_android_core.manager.IMNetEaseManager; import com.yizhuan.xchat_android_core.manager.RoomEvent; -import com.yizhuan.xchat_android_core.pay.bean.ChargeBean; import com.yizhuan.xchat_android_core.pay.bean.FirstChargeGoods; import com.yizhuan.xchat_android_core.pay.bean.WalletInfo; import com.yizhuan.xchat_android_core.pay.bean.WxPayType; @@ -23,8 +23,8 @@ import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent; import com.yizhuan.xchat_android_core.user.event.LoginUserInfoUpdateEvent; import com.yizhuan.xchat_android_core.utils.net.RxHelper; import com.yizhuan.xchat_android_library.net.rxnet.RxNet; -import com.yizhuan.xchat_android_library.utils.LogUtil; import com.yizhuan.xchat_android_library.utils.NetworkUtils; +import com.yizhuan.xchat_android_library.utils.codec.DESUtils; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -43,8 +43,6 @@ import retrofit2.http.Header; import retrofit2.http.POST; import retrofit2.http.Query; -import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_ACCOUNT; - /** * 实现网络的方法 * Created by zhouxiangfeng on 2017/6/19. @@ -259,7 +257,7 @@ public class PayModel extends BaseModel implements IPayModel { long uid, String ticket, String type) { - return api.getCode(mobile, checkExists, uid, ticket, type) + return api.getCode(DESUtils.DESAndBase64(mobile), checkExists, uid, ticket, type) .compose(RxHelper.handleSchedulers()); } @@ -274,7 +272,7 @@ public class PayModel extends BaseModel implements IPayModel { @Override public Single verifyCode(String mobile, String code) { - return api.verifyCode(mobile, code) + return api.verifyCode(DESUtils.DESAndBase64(mobile), code) .flatMap(new Function, SingleSource>() { @Override public SingleSource apply(ServiceResult stringServiceResult) throws Exception { diff --git a/core/src/model_smscode/java/com/yizhuan/xchat_android_core/code/CodeModel.java b/core/src/model_smscode/java/com/yizhuan/xchat_android_core/code/CodeModel.java index 52e360c7c..f6909948f 100644 --- a/core/src/model_smscode/java/com/yizhuan/xchat_android_core/code/CodeModel.java +++ b/core/src/model_smscode/java/com/yizhuan/xchat_android_core/code/CodeModel.java @@ -6,6 +6,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel; import com.yizhuan.xchat_android_core.base.BaseModel; import com.yizhuan.xchat_android_core.bean.response.ServiceResult; import com.yizhuan.xchat_android_library.net.rxnet.RxNet; +import com.yizhuan.xchat_android_library.utils.codec.DESUtils; import io.reactivex.Single; import io.reactivex.SingleSource; @@ -39,7 +40,7 @@ public class CodeModel extends BaseModel implements ICodeModel { */ @Override public Single sendCode(String phone, int type) { - return api.code(phone, AuthModel.get().getCurrentUid(), type) + return api.code(DESUtils.DESAndBase64(phone), AuthModel.get().getCurrentUid(), type) .onErrorResumeNext(this.getSingleCommonExceptionFunction()) .flatMap(new Function, SingleSource>() { @Override diff --git a/gradle.properties b/gradle.properties index cf8f2e63b..23970bb21 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,5 +23,5 @@ only_arm64=false channel_file=channel.txt -version_name=4.3.0 -version_code=430 \ No newline at end of file +version_name=4.4.0 +version_code=440 \ No newline at end of file