Commit ec30fab465f279fe8556923115cb189959de07a5
1 parent
8c263840
Exists in
yxb_dev
and in
2 other branches
no message
Showing
7 changed files
with
20 additions
and
44 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
| @@ -83,27 +83,5 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | @@ -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,7 +50,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
| 50 | mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() { | 50 | mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() { |
| 51 | @Override | 51 | @Override |
| 52 | public void accept(JsonObject jsonObject) throws Exception { | 52 | public void accept(JsonObject jsonObject) throws Exception { |
| 53 | - Timber.i("---=== loginResult :%s", jsonObject); | ||
| 54 | try { | 53 | try { |
| 55 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { | 54 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { |
| 56 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); | 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,19 +68,19 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
| 69 | }, new Consumer<Throwable>() { | 68 | }, new Consumer<Throwable>() { |
| 70 | @Override | 69 | @Override |
| 71 | public void accept(Throwable throwable) throws Exception { | 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 | ResponseBody responseBody = response.errorBody(); | 73 | ResponseBody responseBody = response.errorBody(); |
| 75 | - if (responseBody==null)return; | 74 | + if (responseBody == null) return; |
| 76 | try { | 75 | try { |
| 77 | JSONObject json = new JSONObject(responseBody.string()); | 76 | JSONObject json = new JSONObject(responseBody.string()); |
| 78 | // ToastUtils.showToast(json.optString("message")+"json="+json); | 77 | // ToastUtils.showToast(json.optString("message")+"json="+json); |
| 79 | - if(TextUtils.isEmpty(json.optString("error"))){ | 78 | + if (TextUtils.isEmpty(json.optString("error"))) { |
| 80 | mIView.showerror(json.optString("message")); | 79 | mIView.showerror(json.optString("message")); |
| 81 | return; | 80 | return; |
| 82 | } | 81 | } |
| 83 | mIView.showerror(json.optString("error")); | 82 | mIView.showerror(json.optString("error")); |
| 84 | - } catch (Exception e1) { | 83 | + } catch (Exception e1) { |
| 85 | e1.printStackTrace(); | 84 | e1.printStackTrace(); |
| 86 | } | 85 | } |
| 87 | } | 86 | } |
| @@ -112,15 +111,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -112,15 +111,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
| 112 | }, new Consumer<Throwable>() { | 111 | }, new Consumer<Throwable>() { |
| 113 | @Override | 112 | @Override |
| 114 | public void accept(Throwable throwable) throws Exception { | 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 | ResponseBody responseBody = response.errorBody(); | 116 | ResponseBody responseBody = response.errorBody(); |
| 118 | - if (responseBody==null)return; | 117 | + if (responseBody == null) return; |
| 119 | try { | 118 | try { |
| 120 | JSONObject json = new JSONObject(responseBody.string()); | 119 | JSONObject json = new JSONObject(responseBody.string()); |
| 121 | // ToastUtils.showToast(json.optString("message")+"json="+json); | 120 | // ToastUtils.showToast(json.optString("message")+"json="+json); |
| 122 | mIView.showerror(json.optString("message")); | 121 | mIView.showerror(json.optString("message")); |
| 123 | - } catch (Exception e1) { | 122 | + } catch (Exception e1) { |
| 124 | e1.printStackTrace(); | 123 | e1.printStackTrace(); |
| 125 | } | 124 | } |
| 126 | } | 125 | } |
| @@ -158,7 +157,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -158,7 +157,6 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
| 158 | mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer<UserInfo>() { | 157 | mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer<UserInfo>() { |
| 159 | @Override | 158 | @Override |
| 160 | public void accept(UserInfo userInfo) throws Exception { | 159 | public void accept(UserInfo userInfo) throws Exception { |
| 161 | -// Log.d("6666", "userInfo=" + userInfo.toString()); | ||
| 162 | if (userInfo != null) { | 160 | if (userInfo != null) { |
| 163 | CurrentBean currentBean = userInfo.getData(); | 161 | CurrentBean currentBean = userInfo.getData(); |
| 164 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, currentBean.getMobile()); | 162 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, currentBean.getMobile()); |
| @@ -186,15 +184,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -186,15 +184,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
| 186 | }, new Consumer<Throwable>() { | 184 | }, new Consumer<Throwable>() { |
| 187 | @Override | 185 | @Override |
| 188 | public void accept(Throwable throwable) throws Exception { | 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 | ResponseBody responseBody = response.errorBody(); | 189 | ResponseBody responseBody = response.errorBody(); |
| 192 | - if (responseBody==null)return; | 190 | + if (responseBody == null) return; |
| 193 | try { | 191 | try { |
| 194 | JSONObject json = new JSONObject(responseBody.string()); | 192 | JSONObject json = new JSONObject(responseBody.string()); |
| 195 | // ToastUtils.showToast(json.optString("message")+"json="+json); | 193 | // ToastUtils.showToast(json.optString("message")+"json="+json); |
| 196 | mIView.showerror(json.optString("message")); | 194 | mIView.showerror(json.optString("message")); |
| 197 | - } catch (Exception e1) { | 195 | + } catch (Exception e1) { |
| 198 | e1.printStackTrace(); | 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,7 +34,7 @@ public class PersonInfoPrasenter extends PersonInfoContract.PersonInfoPresenter | ||
| 34 | public void accept(JsonObject jsonObject) throws Exception { | 34 | public void accept(JsonObject jsonObject) throws Exception { |
| 35 | try { | 35 | try { |
| 36 | if(jsonObject!=null&&jsonObject.get("data").getAsBoolean()) { | 36 | if(jsonObject!=null&&jsonObject.get("data").getAsBoolean()) { |
| 37 | - ToastUtils.showToast(jsonObject.toString()); | 37 | +// ToastUtils.showToast(jsonObject.toString()); |
| 38 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, parentName); | 38 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, parentName); |
| 39 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(sex)); | 39 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(sex)); |
| 40 | mIView.updateInfo(); | 40 | mIView.updateInfo(); |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| @@ -87,7 +87,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -87,7 +87,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 87 | videoplayer.replayTextView.setVisibility(View.GONE); | 87 | videoplayer.replayTextView.setVisibility(View.GONE); |
| 88 | videoplayer.backButton.setVisibility(View.GONE); | 88 | videoplayer.backButton.setVisibility(View.GONE); |
| 89 | 89 | ||
| 90 | -// mPresenter.getTools(layout_control); | ||
| 91 | mPresenter.getBanners("2", AppContext.getInstance().district); | 90 | mPresenter.getBanners("2", AppContext.getInstance().district); |
| 92 | 91 | ||
| 93 | initBroadCast(); | 92 | initBroadCast(); |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| @@ -77,12 +77,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -77,12 +77,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 77 | private void setPersonInfo() { | 77 | private void setPersonInfo() { |
| 78 | if (AppConfig.ISLOGIN) { | 78 | if (AppConfig.ISLOGIN) { |
| 79 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); | 79 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
| 80 | - ToastUtils.showToast(url); | ||
| 81 | if (!TextUtils.isEmpty(url)) { | 80 | if (!TextUtils.isEmpty(url)) { |
| 82 | GlideUtils.showImg(getContext(),user_photo,url); | 81 | GlideUtils.showImg(getContext(),user_photo,url); |
| 83 | -// Glide.with(getActivity()).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_photo); | ||
| 84 | } else { | 82 | } else { |
| 85 | -// Glide.with(getActivity()).load(R.drawable.test).centerCrop().into(user_photo); | ||
| 86 | GlideUtils.showImg(getContext(),user_photo,url); | 83 | GlideUtils.showImg(getContext(),user_photo,url); |
| 87 | user_photo.setCornerRadius(20); | 84 | user_photo.setCornerRadius(20); |
| 88 | } | 85 | } |
| @@ -165,6 +162,8 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -165,6 +162,8 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 165 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, ""); | 162 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, ""); |
| 166 | AppConfig.ISLOGIN=false; | 163 | AppConfig.ISLOGIN=false; |
| 167 | setPersonInfo(); | 164 | setPersonInfo(); |
| 165 | + startNewActivity(LoginAndRegistActivity.class); | ||
| 166 | + getActivity().finish(); | ||
| 168 | } | 167 | } |
| 169 | 168 | ||
| 170 | @Override | 169 | @Override |
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
| @@ -7,6 +7,7 @@ import android.support.annotation.Nullable; | @@ -7,6 +7,7 @@ import android.support.annotation.Nullable; | ||
| 7 | import android.text.Editable; | 7 | import android.text.Editable; |
| 8 | import android.text.TextUtils; | 8 | import android.text.TextUtils; |
| 9 | import android.text.TextWatcher; | 9 | import android.text.TextWatcher; |
| 10 | +import android.util.Log; | ||
| 10 | import android.view.Gravity; | 11 | import android.view.Gravity; |
| 11 | import android.view.LayoutInflater; | 12 | import android.view.LayoutInflater; |
| 12 | import android.view.View; | 13 | import android.view.View; |
| @@ -181,7 +182,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | @@ -181,7 +182,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | ||
| 181 | @Override | 182 | @Override |
| 182 | public void showerror(String error) { | 183 | public void showerror(String error) { |
| 183 | progressDialog.dismiss(); | 184 | progressDialog.dismiss(); |
| 184 | - ToastUtils.showToast(error); | 185 | +// ToastUtils.showToast(error); |
| 185 | } | 186 | } |
| 186 | 187 | ||
| 187 | @Override | 188 | @Override |
app/src/main/res/layout/fragment_report.xml
| @@ -15,12 +15,13 @@ | @@ -15,12 +15,13 @@ | ||
| 15 | android:padding="10dp"> | 15 | android:padding="10dp"> |
| 16 | 16 | ||
| 17 | <TextView | 17 | <TextView |
| 18 | + android:id="@+id/tvName" | ||
| 18 | android:layout_width="wrap_content" | 19 | android:layout_width="wrap_content" |
| 19 | android:layout_height="wrap_content" | 20 | android:layout_height="wrap_content" |
| 20 | android:layout_gravity="center_vertical" | 21 | android:layout_gravity="center_vertical" |
| 21 | android:drawablePadding="10dp" | 22 | android:drawablePadding="10dp" |
| 22 | android:drawableRight="@drawable/pull" | 23 | android:drawableRight="@drawable/pull" |
| 23 | - android:text="马铂骞" | 24 | + android:text="" |
| 24 | android:textColor="@color/textColor" | 25 | android:textColor="@color/textColor" |
| 25 | android:textSize="@dimen/textSize16" /> | 26 | android:textSize="@dimen/textSize16" /> |
| 26 | 27 |