Commit d4f3a4864c6daa1d8d540b1c96d9206eb602f3c0

Authored by 姚旭斌
1 parent ce0a88ea

no message

app/src/main/java/com/shunzhi/parent/AppConfig.java
... ... @@ -37,9 +37,15 @@ public class AppConfig {
37 37 public static String APP_IS_START = "app_is_start";
38 38  
39 39 //http://campus.myjxt.com/
40   - public static String BASE_URL="http://60.190.202.57:1000/";
41   - public static String BASE_URL_ORDER="http://60.190.202.57:8101/";
42   - public static String BASE_URL_FILE="http://60.190.202.57:8196";
  40 +// public static String BASE_URL="http://60.190.202.57:1000/";
  41 +// public static String BASE_URL_ORDER="http://60.190.202.57:8101/";
  42 +// public static String BASE_URL_FILE="http://60.190.202.57:8196";
  43 +
  44 +
  45 + //正式
  46 + public static String BASE_URL="http://campus.myjxt.com/";
  47 + public static String BASE_URL_ORDER="http://parent.myjxt.com/";
  48 + public static String BASE_URL_FILE="http://manage.myjxt.com ";
43 49  
44 50  
45 51 //默认日志保存的路径
... ...
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
... ... @@ -67,21 +67,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
67 67 }, new Consumer<Throwable>() {
68 68 @Override
69 69 public void accept(Throwable throwable) throws Exception {
70   - Response response = ((HttpException) throwable).response();
71   - if (response == null) return;
72   - ResponseBody responseBody = response.errorBody();
73   - if (responseBody == null) return;
74   - try {
75   - JSONObject json = new JSONObject(responseBody.string());
76   -// ToastUtils.showToast(json.optString("message")+"json="+json);
77   - if (TextUtils.isEmpty(json.optString("error"))) {
78   - mIView.showerror(json.optString("message"));
79   - return;
80   - }
81   - mIView.showerror(json.optString("error"));
82   - } catch (Exception e1) {
83   - e1.printStackTrace();
84   - }
  70 + OkHttpExceptionUtil.handOkHttpException((HttpException) throwable);
85 71 }
86 72 }));
87 73  
... ...