Commit fbd004dda79f0eb38227e5c064786bce94fdb385

Authored by 姚旭斌
2 parents ccad9511 2f0e5240

Merge branch 'developer' into yxb_dev

app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
... ... @@ -83,27 +83,5 @@ public class CePingPresenter extends CepingContract.CePingPresenter {
83 83  
84 84 }
85 85 }));
86   - /*List<ToolBean> toolBeanList=new ArrayList<>();
87   - toolBeanList.add(new ToolBean(R.drawable.gxzt+"","高校直通"));
88   - toolBeanList.add(new ToolBean(R.drawable.zycx+"","专业查询"));
89   - toolBeanList.add(new ToolBean(R.drawable.cmyk+"","传媒艺考"));
90   - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜"));
91   - for (int i = 0; i < toolBeanList.size(); i++) {
92   - TextAndImgShowView textAndImgShowView=new TextAndImgShowView(mIView.getBindActivity());
93   - textAndImgShowView.setTextColor(R.color.textColor);
94   - textAndImgShowView.setText(toolBeanList.get(i).toolName);
95   - textAndImgShowView.setImgs(R.drawable.play, Integer.parseInt(toolBeanList.get(i).toolImage));
96   - textAndImgShowView.setSelect(true);
97   - textAndImgShowView.setWidth(mIView.getBindActivity(),layout_control);
98   - textAndImgShowView.setBackground(AttrsUtils.getAttrs(mIView.getBindActivity()).getDrawable(0));
99   - textAndImgShowView.setOnClickListener(new View.OnClickListener() {
100   - @Override
101   - public void onClick(View view) {
102   -
103   - }
104   - });
105   - layout_control.addView(textAndImgShowView);
106   - }*/
107   -// mIView.showTools(toolBeanList);
108 86 }
109 87 }
... ...
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
... ... @@ -50,7 +50,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
50 50 mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() {
51 51 @Override
52 52 public void accept(JsonObject jsonObject) throws Exception {
53   - Timber.i("---=== loginResult :%s", jsonObject);
54 53 try {
55 54 if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) {
56 55 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString());
... ... @@ -69,19 +68,19 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
69 68 }, new Consumer<Throwable>() {
70 69 @Override
71 70 public void accept(Throwable throwable) throws Exception {
72   - Response response = ((HttpException)throwable).response();
73   - if (response==null)return;
  71 + Response response = ((HttpException) throwable).response();
  72 + if (response == null) return;
74 73 ResponseBody responseBody = response.errorBody();
75   - if (responseBody==null)return;
  74 + if (responseBody == null) return;
76 75 try {
77 76 JSONObject json = new JSONObject(responseBody.string());
78 77 // ToastUtils.showToast(json.optString("message")+"json="+json);
79   - if(TextUtils.isEmpty(json.optString("error"))){
  78 + if (TextUtils.isEmpty(json.optString("error"))) {
80 79 mIView.showerror(json.optString("message"));
81 80 return;
82 81 }
83 82 mIView.showerror(json.optString("error"));
84   - } catch (Exception e1) {
  83 + } catch (Exception e1) {
85 84 e1.printStackTrace();
86 85 }
87 86 }
... ... @@ -112,15 +111,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
112 111 }, new Consumer<Throwable>() {
113 112 @Override
114 113 public void accept(Throwable throwable) throws Exception {
115   - Response response = ((HttpException)throwable).response();
116   - if (response==null)return;
  114 + Response response = ((HttpException) throwable).response();
  115 + if (response == null) return;
117 116 ResponseBody responseBody = response.errorBody();
118   - if (responseBody==null)return;
  117 + if (responseBody == null) return;
119 118 try {
120 119 JSONObject json = new JSONObject(responseBody.string());
121 120 // ToastUtils.showToast(json.optString("message")+"json="+json);
122 121 mIView.showerror(json.optString("message"));
123   - } catch (Exception e1) {
  122 + } catch (Exception e1) {
124 123 e1.printStackTrace();
125 124 }
126 125 }
... ... @@ -158,7 +157,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
158 157 mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer<UserInfo>() {
159 158 @Override
160 159 public void accept(UserInfo userInfo) throws Exception {
161   -// Log.d("6666", "userInfo=" + userInfo.toString());
162 160 if (userInfo != null) {
163 161 CurrentBean currentBean = userInfo.getData();
164 162 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, currentBean.getMobile());
... ... @@ -186,15 +184,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
186 184 }, new Consumer<Throwable>() {
187 185 @Override
188 186 public void accept(Throwable throwable) throws Exception {
189   - Response response = ((HttpException)throwable).response();
190   - if (response==null)return;
  187 + Response response = ((HttpException) throwable).response();
  188 + if (response == null) return;
191 189 ResponseBody responseBody = response.errorBody();
192   - if (responseBody==null)return;
  190 + if (responseBody == null) return;
193 191 try {
194 192 JSONObject json = new JSONObject(responseBody.string());
195 193 // ToastUtils.showToast(json.optString("message")+"json="+json);
196 194 mIView.showerror(json.optString("message"));
197   - } catch (Exception e1) {
  195 + } catch (Exception e1) {
198 196 e1.printStackTrace();
199 197 }
200 198  
... ...
app/src/main/java/com/shunzhi/parent/presenter/mine/PersonInfoPrasenter.java
... ... @@ -34,7 +34,7 @@ public class PersonInfoPrasenter extends PersonInfoContract.PersonInfoPresenter
34 34 public void accept(JsonObject jsonObject) throws Exception {
35 35 try {
36 36 if(jsonObject!=null&&jsonObject.get("data").getAsBoolean()) {
37   - ToastUtils.showToast(jsonObject.toString());
  37 +// ToastUtils.showToast(jsonObject.toString());
38 38 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, parentName);
39 39 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(sex));
40 40 mIView.updateInfo();
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
... ... @@ -87,7 +87,6 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
87 87 videoplayer.replayTextView.setVisibility(View.GONE);
88 88 videoplayer.backButton.setVisibility(View.GONE);
89 89  
90   -// mPresenter.getTools(layout_control);
91 90 mPresenter.getBanners("2", AppContext.getInstance().district);
92 91  
93 92 initBroadCast();
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... ... @@ -74,12 +74,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
74 74 private void setPersonInfo() {
75 75 if (AppConfig.ISLOGIN) {
76 76 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE);
77   -// ToastUtils.showToast(url);
78 77 if (!TextUtils.isEmpty(url)) {
79 78 GlideUtils.showImg(getContext(),user_photo,url);
80   -// Glide.with(getActivity()).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_photo);
81 79 } else {
82   -// Glide.with(getActivity()).load(R.drawable.test).centerCrop().into(user_photo);
83 80 GlideUtils.showImg(getContext(),user_photo,url);
84 81 user_photo.setCornerRadius(20);
85 82 }
... ... @@ -165,6 +162,8 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
165 162 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, "");
166 163 AppConfig.ISLOGIN=false;
167 164 setPersonInfo();
  165 + startNewActivity(LoginAndRegistActivity.class);
  166 + getActivity().finish();
168 167 }
169 168  
170 169 @Override
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
... ... @@ -7,6 +7,7 @@ import android.support.annotation.Nullable;
7 7 import android.text.Editable;
8 8 import android.text.TextUtils;
9 9 import android.text.TextWatcher;
  10 +import android.util.Log;
10 11 import android.view.Gravity;
11 12 import android.view.LayoutInflater;
12 13 import android.view.View;
... ... @@ -181,7 +182,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment&lt;LoginAndRegist
181 182 @Override
182 183 public void showerror(String error) {
183 184 progressDialog.dismiss();
184   - ToastUtils.showToast(error);
  185 +// ToastUtils.showToast(error);
185 186 }
186 187  
187 188 @Override
... ...
app/src/main/res/layout/fragment_report.xml
... ... @@ -15,12 +15,13 @@
15 15 android:padding="10dp">
16 16  
17 17 <TextView
  18 + android:id="@+id/tvName"
18 19 android:layout_width="wrap_content"
19 20 android:layout_height="wrap_content"
20 21 android:layout_gravity="center_vertical"
21 22 android:drawablePadding="10dp"
22 23 android:drawableRight="@drawable/pull"
23   - android:text="马铂骞"
  24 + android:text=""
24 25 android:textColor="@color/textColor"
25 26 android:textSize="@dimen/textSize16" />
26 27  
... ...