diff --git a/app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java b/app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java index a5f0f3c..4f7e675 100644 --- a/app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java +++ b/app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java @@ -83,27 +83,5 @@ public class CePingPresenter extends CepingContract.CePingPresenter { } })); - /*List toolBeanList=new ArrayList<>(); - toolBeanList.add(new ToolBean(R.drawable.gxzt+"","高校直通")); - toolBeanList.add(new ToolBean(R.drawable.zycx+"","专业查询")); - toolBeanList.add(new ToolBean(R.drawable.cmyk+"","传媒艺考")); - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); - for (int i = 0; i < toolBeanList.size(); i++) { - TextAndImgShowView textAndImgShowView=new TextAndImgShowView(mIView.getBindActivity()); - textAndImgShowView.setTextColor(R.color.textColor); - textAndImgShowView.setText(toolBeanList.get(i).toolName); - textAndImgShowView.setImgs(R.drawable.play, Integer.parseInt(toolBeanList.get(i).toolImage)); - textAndImgShowView.setSelect(true); - textAndImgShowView.setWidth(mIView.getBindActivity(),layout_control); - textAndImgShowView.setBackground(AttrsUtils.getAttrs(mIView.getBindActivity()).getDrawable(0)); - textAndImgShowView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - - } - }); - layout_control.addView(textAndImgShowView); - }*/ -// mIView.showTools(toolBeanList); } } 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 6dbb602..8d9dec9 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 @@ -50,7 +50,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer() { @Override public void accept(JsonObject jsonObject) throws Exception { - Timber.i("---=== loginResult :%s", jsonObject); try { if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); @@ -69,19 +68,19 @@ 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; + Response response = ((HttpException) throwable).response(); + if (response == null) return; ResponseBody responseBody = response.errorBody(); - if (responseBody==null)return; + if (responseBody == null) return; try { JSONObject json = new JSONObject(responseBody.string()); // ToastUtils.showToast(json.optString("message")+"json="+json); - if(TextUtils.isEmpty(json.optString("error"))){ + if (TextUtils.isEmpty(json.optString("error"))) { mIView.showerror(json.optString("message")); return; } mIView.showerror(json.optString("error")); - } catch (Exception e1) { + } catch (Exception e1) { e1.printStackTrace(); } } @@ -112,15 +111,15 @@ 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; + Response response = ((HttpException) throwable).response(); + if (response == null) return; ResponseBody responseBody = response.errorBody(); - if (responseBody==null)return; + if (responseBody == null) return; try { JSONObject json = new JSONObject(responseBody.string()); // ToastUtils.showToast(json.optString("message")+"json="+json); mIView.showerror(json.optString("message")); - } catch (Exception e1) { + } catch (Exception e1) { e1.printStackTrace(); } } @@ -158,7 +157,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer() { @Override public void accept(UserInfo userInfo) throws Exception { -// Log.d("6666", "userInfo=" + userInfo.toString()); if (userInfo != null) { CurrentBean currentBean = userInfo.getData(); AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, currentBean.getMobile()); @@ -186,15 +184,15 @@ 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; + Response response = ((HttpException) throwable).response(); + if (response == null) return; ResponseBody responseBody = response.errorBody(); - if (responseBody==null)return; + if (responseBody == null) return; try { JSONObject json = new JSONObject(responseBody.string()); // ToastUtils.showToast(json.optString("message")+"json="+json); mIView.showerror(json.optString("message")); - } catch (Exception e1) { + } catch (Exception e1) { e1.printStackTrace(); } diff --git a/app/src/main/java/com/shunzhi/parent/presenter/mine/PersonInfoPrasenter.java b/app/src/main/java/com/shunzhi/parent/presenter/mine/PersonInfoPrasenter.java index 5b15f41..2e00c5b 100644 --- a/app/src/main/java/com/shunzhi/parent/presenter/mine/PersonInfoPrasenter.java +++ b/app/src/main/java/com/shunzhi/parent/presenter/mine/PersonInfoPrasenter.java @@ -34,7 +34,7 @@ public class PersonInfoPrasenter extends PersonInfoContract.PersonInfoPresenter public void accept(JsonObject jsonObject) throws Exception { try { if(jsonObject!=null&&jsonObject.get("data").getAsBoolean()) { - ToastUtils.showToast(jsonObject.toString()); +// ToastUtils.showToast(jsonObject.toString()); AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, parentName); AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(sex)); mIView.updateInfo(); diff --git a/app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java b/app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java index 6e7847a..9d0f0df 100644 --- a/app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java +++ b/app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java @@ -87,7 +87,6 @@ public class ConsultFragment extends BaseMVPCompatFragment -- libgit2 0.21.0