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,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 | @Override | 53 | @Override |
43 | public void addAll(List<SortBean> data) { | 54 | public void addAll(List<SortBean> data) { |
44 | super.addAll(data); | 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,8 +169,9 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
169 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); | 169 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); |
170 | 170 | ||
171 | if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { | 171 | if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { |
172 | -// Log.e("qqqq--==","qqqqq"); | ||
173 | AppConfig.getAppConfig(mIView.getBindActivity()).set(AppConfig.ISBINDING, "1"); | 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 | String account = currentBean.getUserid(); | 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,6 +102,11 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | ||
102 | public void updateChildList(CurrentBean currentBean) { | 102 | public void updateChildList(CurrentBean currentBean) { |
103 | currlist.clear(); | 103 | currlist.clear(); |
104 | List<ChildBean> list = currentBean.getStudentClass(); | 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 | currlist.addAll(list); | 110 | currlist.addAll(list); |
106 | if (childAdapter == null) { | 111 | if (childAdapter == null) { |
107 | childAdapter = new ChildAdapter(this); | 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,7 +226,9 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
226 | schoolListAdapter.addAll(schoolList); | 226 | schoolListAdapter.addAll(schoolList); |
227 | schoollist.setAdapter(schoolListAdapter); | 227 | schoollist.setAdapter(schoolListAdapter); |
228 | } else { | 228 | } else { |
229 | + | ||
229 | schoolListAdapter.addAll(schoolList); | 230 | schoolListAdapter.addAll(schoolList); |
231 | + schoolListAdapter.setStart(); | ||
230 | schoolListAdapter.notifyDataSetChanged(); | 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,9 +79,8 @@ public class WebViewActivity extends BaseCompatActivity { | ||
79 | public void onClick(View v) { | 79 | public void onClick(View v) { |
80 | if (type != -1 && type != AppConfig.ORDER_CENTER) { | 80 | if (type != -1 && type != AppConfig.ORDER_CENTER) { |
81 | startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(WebViewActivity.this, MainActivity.class)); | 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,7 +100,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
101 | if (token != null && !"".equals(token) && !TextUtils.isEmpty(token)) { | 100 | if (token != null && !"".equals(token) && !TextUtils.isEmpty(token)) { |
102 | url = url + "&Token=" + token; | 101 | url = url + "&Token=" + token; |
103 | } | 102 | } |
104 | -// Log.d("66666","url="+url); | ||
105 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | 103 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { |
106 | binding_success.setVisibility(View.VISIBLE); | 104 | binding_success.setVisibility(View.VISIBLE); |
107 | binding_success2.setVisibility(View.GONE); | 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,6 +7,7 @@ import android.os.Bundle; | ||
7 | import android.support.annotation.NonNull; | 7 | import android.support.annotation.NonNull; |
8 | import android.support.annotation.Nullable; | 8 | import android.support.annotation.Nullable; |
9 | import android.text.TextUtils; | 9 | import android.text.TextUtils; |
10 | +import android.util.Log; | ||
10 | import android.view.View; | 11 | import android.view.View; |
11 | import android.widget.LinearLayout; | 12 | import android.widget.LinearLayout; |
12 | import android.widget.TextView; | 13 | import android.widget.TextView; |
@@ -16,6 +17,7 @@ import com.makeramen.roundedimageview.RoundedImageView; | @@ -16,6 +17,7 @@ import com.makeramen.roundedimageview.RoundedImageView; | ||
16 | import com.share.mvpsdk.base.BasePresenter; | 17 | import com.share.mvpsdk.base.BasePresenter; |
17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 18 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
18 | import com.share.mvpsdk.utils.CacheUtils; | 19 | import com.share.mvpsdk.utils.CacheUtils; |
20 | +import com.share.mvpsdk.utils.ToastUtils; | ||
19 | import com.shunzhi.parent.AppConfig; | 21 | import com.shunzhi.parent.AppConfig; |
20 | import com.shunzhi.parent.AppContext; | 22 | import com.shunzhi.parent.AppContext; |
21 | import com.shunzhi.parent.BuildConfig; | 23 | import com.shunzhi.parent.BuildConfig; |
@@ -102,9 +104,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -102,9 +104,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
102 | String useName = AppConfig.getAppConfig(getContext()).get(AppConfig.USER_NAME); | 104 | String useName = AppConfig.getAppConfig(getContext()).get(AppConfig.USER_NAME); |
103 | if (!TextUtils.isEmpty(useName)) AppConfig.ISLOGIN = true; | 105 | if (!TextUtils.isEmpty(useName)) AppConfig.ISLOGIN = true; |
104 | else AppConfig.ISLOGIN = false; | 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 | binding_state.setText(""); | 108 | binding_state.setText(""); |
109 | + } else { | ||
110 | + binding_state.setText("未绑定"); | ||
108 | } | 111 | } |
109 | 112 | ||
110 | if (AppConfig.ISLOGIN) { | 113 | if (AppConfig.ISLOGIN) { |
@@ -156,11 +159,15 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -156,11 +159,15 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
156 | startNewActivity(OrderDetailActivity.class); | 159 | startNewActivity(OrderDetailActivity.class); |
157 | break; | 160 | break; |
158 | case R.id.layout_order: | 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 | break; | 171 | break; |
165 | case R.id.tvExit: | 172 | case R.id.tvExit: |
166 | clearUerinfo(); | 173 | clearUerinfo(); |
app/src/main/res/layout/fragment_mine.xml
@@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
30 | android:textSize="@dimen/sp_18" /> | 30 | android:textSize="@dimen/sp_18" /> |
31 | 31 | ||
32 | <LinearLayout | 32 | <LinearLayout |
33 | + android:layout_marginTop="20dp" | ||
33 | android:id="@+id/personinfo" | 34 | android:id="@+id/personinfo" |
34 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
35 | android:layout_height="wrap_content" | 36 | android:layout_height="wrap_content" |
@@ -73,8 +74,8 @@ | @@ -73,8 +74,8 @@ | ||
73 | </LinearLayout> | 74 | </LinearLayout> |
74 | 75 | ||
75 | <ImageView | 76 | <ImageView |
76 | - android:layout_width="30dp" | ||
77 | - android:layout_height="30dp" | 77 | + android:layout_width="25dp" |
78 | + android:layout_height="25dp" | ||
78 | android:layout_marginRight="20dp" | 79 | android:layout_marginRight="20dp" |
79 | android:layout_gravity="center_vertical" | 80 | android:layout_gravity="center_vertical" |
80 | android:src="@drawable/arrow_right" /> | 81 | android:src="@drawable/arrow_right" /> |