From d4f3a4864c6daa1d8d540b1c96d9206eb602f3c0 Mon Sep 17 00:00:00 2001 From: 姚旭斌 <15805828761@163.com> Date: Sat, 24 Mar 2018 14:54:32 +0800 Subject: [PATCH] no message --- app/src/main/java/com/shunzhi/parent/AppConfig.java | 12 +++++++++--- app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java | 16 +--------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/com/shunzhi/parent/AppConfig.java b/app/src/main/java/com/shunzhi/parent/AppConfig.java index 7c16f0d..c11981e 100644 --- a/app/src/main/java/com/shunzhi/parent/AppConfig.java +++ b/app/src/main/java/com/shunzhi/parent/AppConfig.java @@ -37,9 +37,15 @@ public class AppConfig { public static String APP_IS_START = "app_is_start"; //http://campus.myjxt.com/ - public static String BASE_URL="http://60.190.202.57:1000/"; - public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; - public static String BASE_URL_FILE="http://60.190.202.57:8196"; +// public static String BASE_URL="http://60.190.202.57:1000/"; +// public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; +// public static String BASE_URL_FILE="http://60.190.202.57:8196"; + + + //正式 + public static String BASE_URL="http://campus.myjxt.com/"; + public static String BASE_URL_ORDER="http://parent.myjxt.com/"; + public static String BASE_URL_FILE="http://manage.myjxt.com "; //默认日志保存的路径 diff --git a/app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java b/app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java index 24d2c02..b2e4a57 100644 --- a/app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java +++ b/app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java @@ -67,21 +67,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre }, new Consumer() { @Override public void accept(Throwable throwable) throws Exception { - Response response = ((HttpException) throwable).response(); - if (response == null) return; - ResponseBody responseBody = response.errorBody(); - if (responseBody == null) return; - try { - JSONObject json = new JSONObject(responseBody.string()); -// ToastUtils.showToast(json.optString("message")+"json="+json); - if (TextUtils.isEmpty(json.optString("error"))) { - mIView.showerror(json.optString("message")); - return; - } - mIView.showerror(json.optString("error")); - } catch (Exception e1) { - e1.printStackTrace(); - } + OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); } })); -- libgit2 0.21.0