[Modify]登录功能修改
This commit is contained in:
@@ -6,7 +6,6 @@ import android.text.TextUtils
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import com.coorchice.library.utils.LogUtils
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent
|
||||
import com.yizhuan.erban.MainActivity
|
||||
@@ -93,8 +92,9 @@ class LoginPhoneActivity : BaseViewBindingActivity<ActivityLoginPhoneBinding>(),
|
||||
|
||||
override fun onError(e: Throwable) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(e.message)
|
||||
LogUtils.e(e.message)
|
||||
if(e.message != null) {
|
||||
toast(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
@@ -7,6 +7,7 @@ import android.text.style.ForegroundColorSpan;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.appsflyer.internal.components.network.http.exceptions.HttpException;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
@@ -17,6 +18,8 @@ import com.yizhuan.xchat_android_library.net.rxnet.exception.ExceptionHandle;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
@@ -38,7 +41,9 @@ public class LogoutHelper {
|
||||
eventLabel.append(msg);
|
||||
}
|
||||
}
|
||||
if (e instanceof BanAccountException) {
|
||||
if (e instanceof SocketTimeoutException || e instanceof SocketException || e instanceof HttpException) {
|
||||
activity.toast(ResUtil.getString(R.string.login_helper_logouthelper_013));
|
||||
} else if (e instanceof BanAccountException) {
|
||||
BanAccountException exception = (BanAccountException) e;
|
||||
String text = ResUtil.getString(R.string.login_helper_logouthelper_02) + exception.getMessage() + ResUtil.getString(R.string.login_helper_logouthelper_03);
|
||||
int start = text.length();
|
||||
|
@@ -2,11 +2,9 @@
|
||||
<network-security-config>
|
||||
|
||||
<base-config cleartextTrafficPermitted="true">
|
||||
<debug-overrides>
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
</trust-anchors>
|
||||
</debug-overrides>
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
</trust-anchors>
|
||||
</base-config>
|
||||
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
|
Reference in New Issue
Block a user