Commit c1a67969e749313c963a4ad57d6097e51a8d673f
1 parent
5d4b8821
Exists in
yxb_dev
and in
1 other branch
no message
Showing
8 changed files
with
38 additions
and
13 deletions
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/java/com/shunzhi/parent/adapter/SchoolListAdapter.java
| ... | ... | @@ -39,6 +39,17 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { |
| 39 | 39 | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + | |
| 43 | + public void setStart(){ | |
| 44 | + ischeck = new boolean[list.size()]; | |
| 45 | + for (int i=0;i<ischeck.length;i++){ | |
| 46 | + ischeck[i]=false; | |
| 47 | + } | |
| 48 | + currentPosition=-1; | |
| 49 | + | |
| 50 | + } | |
| 51 | + | |
| 52 | + | |
| 42 | 53 | @Override |
| 43 | 54 | public void addAll(List<SortBean> data) { |
| 44 | 55 | super.addAll(data); | ... | ... |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
| ... | ... | @@ -169,8 +169,9 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre |
| 169 | 169 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); |
| 170 | 170 | |
| 171 | 171 | if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { |
| 172 | -// Log.e("qqqq--==","qqqqq"); | |
| 173 | 172 | AppConfig.getAppConfig(mIView.getBindActivity()).set(AppConfig.ISBINDING, "1"); |
| 173 | + }else{ | |
| 174 | + AppConfig.getAppConfig(mIView.getBindActivity()).set(AppConfig.ISBINDING, "0"); | |
| 174 | 175 | } |
| 175 | 176 | |
| 176 | 177 | String account = currentBean.getUserid(); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
| ... | ... | @@ -102,6 +102,11 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi |
| 102 | 102 | public void updateChildList(CurrentBean currentBean) { |
| 103 | 103 | currlist.clear(); |
| 104 | 104 | List<ChildBean> list = currentBean.getStudentClass(); |
| 105 | + if (list.size() > 0) { | |
| 106 | + AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ISBINDING, "1"); | |
| 107 | + } else { | |
| 108 | + AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ISBINDING, "0"); | |
| 109 | + } | |
| 105 | 110 | currlist.addAll(list); |
| 106 | 111 | if (childAdapter == null) { |
| 107 | 112 | childAdapter = new ChildAdapter(this); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
| ... | ... | @@ -226,7 +226,9 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra |
| 226 | 226 | schoolListAdapter.addAll(schoolList); |
| 227 | 227 | schoollist.setAdapter(schoolListAdapter); |
| 228 | 228 | } else { |
| 229 | + | |
| 229 | 230 | schoolListAdapter.addAll(schoolList); |
| 231 | + schoolListAdapter.setStart(); | |
| 230 | 232 | schoolListAdapter.notifyDataSetChanged(); |
| 231 | 233 | } |
| 232 | 234 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
| ... | ... | @@ -79,9 +79,8 @@ public class WebViewActivity extends BaseCompatActivity { |
| 79 | 79 | public void onClick(View v) { |
| 80 | 80 | if (type != -1 && type != AppConfig.ORDER_CENTER) { |
| 81 | 81 | startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(WebViewActivity.this, MainActivity.class)); |
| 82 | - } else { | |
| 83 | - finish(); | |
| 84 | 82 | } |
| 83 | + finish(); | |
| 85 | 84 | } |
| 86 | 85 | }); |
| 87 | 86 | |
| ... | ... | @@ -101,7 +100,6 @@ public class WebViewActivity extends BaseCompatActivity { |
| 101 | 100 | if (token != null && !"".equals(token) && !TextUtils.isEmpty(token)) { |
| 102 | 101 | url = url + "&Token=" + token; |
| 103 | 102 | } |
| 104 | -// Log.d("66666","url="+url); | |
| 105 | 103 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { |
| 106 | 104 | binding_success.setVisibility(View.VISIBLE); |
| 107 | 105 | binding_success2.setVisibility(View.GONE); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| ... | ... | @@ -7,6 +7,7 @@ import android.os.Bundle; |
| 7 | 7 | import android.support.annotation.NonNull; |
| 8 | 8 | import android.support.annotation.Nullable; |
| 9 | 9 | import android.text.TextUtils; |
| 10 | +import android.util.Log; | |
| 10 | 11 | import android.view.View; |
| 11 | 12 | import android.widget.LinearLayout; |
| 12 | 13 | import android.widget.TextView; |
| ... | ... | @@ -16,6 +17,7 @@ import com.makeramen.roundedimageview.RoundedImageView; |
| 16 | 17 | import com.share.mvpsdk.base.BasePresenter; |
| 17 | 18 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 18 | 19 | import com.share.mvpsdk.utils.CacheUtils; |
| 20 | +import com.share.mvpsdk.utils.ToastUtils; | |
| 19 | 21 | import com.shunzhi.parent.AppConfig; |
| 20 | 22 | import com.shunzhi.parent.AppContext; |
| 21 | 23 | import com.shunzhi.parent.BuildConfig; |
| ... | ... | @@ -102,9 +104,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 102 | 104 | String useName = AppConfig.getAppConfig(getContext()).get(AppConfig.USER_NAME); |
| 103 | 105 | if (!TextUtils.isEmpty(useName)) AppConfig.ISLOGIN = true; |
| 104 | 106 | else AppConfig.ISLOGIN = false; |
| 105 | - | |
| 106 | - if (!TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.ISBINDING))) { | |
| 107 | + if (AppConfig.getAppConfig(getContext()).get(AppConfig.ISBINDING).equals("1")) { | |
| 107 | 108 | binding_state.setText(""); |
| 109 | + } else { | |
| 110 | + binding_state.setText("未绑定"); | |
| 108 | 111 | } |
| 109 | 112 | |
| 110 | 113 | if (AppConfig.ISLOGIN) { |
| ... | ... | @@ -156,11 +159,15 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 156 | 159 | startNewActivity(OrderDetailActivity.class); |
| 157 | 160 | break; |
| 158 | 161 | case R.id.layout_order: |
| 159 | - Bundle bundle = new Bundle(); | |
| 160 | - bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | |
| 161 | - AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | |
| 162 | - bundle.putInt("type", AppConfig.ORDER_CENTER); | |
| 163 | - startNewActivity(WebViewActivity.class, bundle); | |
| 162 | + if (AppConfig.getAppConfig(getContext()).get(AppConfig.ISBINDING).equals("1")) { | |
| 163 | + Bundle bundle = new Bundle(); | |
| 164 | + bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | |
| 165 | + AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | |
| 166 | + bundle.putInt("type", AppConfig.ORDER_CENTER); | |
| 167 | + startNewActivity(WebViewActivity.class, bundle); | |
| 168 | + } else { | |
| 169 | + ToastUtils.showToast("请先绑定孩子"); | |
| 170 | + } | |
| 164 | 171 | break; |
| 165 | 172 | case R.id.tvExit: |
| 166 | 173 | clearUerinfo(); | ... | ... |
app/src/main/res/layout/fragment_mine.xml
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | android:textSize="@dimen/sp_18" /> |
| 31 | 31 | |
| 32 | 32 | <LinearLayout |
| 33 | + android:layout_marginTop="20dp" | |
| 33 | 34 | android:id="@+id/personinfo" |
| 34 | 35 | android:layout_width="match_parent" |
| 35 | 36 | android:layout_height="wrap_content" |
| ... | ... | @@ -73,8 +74,8 @@ |
| 73 | 74 | </LinearLayout> |
| 74 | 75 | |
| 75 | 76 | <ImageView |
| 76 | - android:layout_width="30dp" | |
| 77 | - android:layout_height="30dp" | |
| 77 | + android:layout_width="25dp" | |
| 78 | + android:layout_height="25dp" | |
| 78 | 79 | android:layout_marginRight="20dp" |
| 79 | 80 | android:layout_gravity="center_vertical" |
| 80 | 81 | android:src="@drawable/arrow_right" /> | ... | ... |