Commit 8c991655c498c97fe217b993f30c112960fad3ec

Authored by 姚旭斌
1 parent 26d3505e

no message

app/src/main/AndroidManifest.xml
@@ -101,9 +101,7 @@ @@ -101,9 +101,7 @@
101 android:screenOrientation="portrait" 101 android:screenOrientation="portrait"
102 android:windowSoftInputMode="adjustPan|stateHidden" /> 102 android:windowSoftInputMode="adjustPan|stateHidden" />
103 <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity"></activity> 103 <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity"></activity>
104 - <activity android:name=".ui.MainActivity"  
105 - android:screenOrientation="portrait"  
106 - /> 104 +
107 </application> 105 </application>
108 106
109 </manifest> 107 </manifest>
110 \ No newline at end of file 108 \ No newline at end of file
app/src/main/java/com/shunzhi/parent/adapter/ChildAdapter.java
@@ -32,17 +32,20 @@ public class ChildAdapter extends BaseRecyclerViewAdapter&lt;ChildBean&gt;{ @@ -32,17 +32,20 @@ public class ChildAdapter extends BaseRecyclerViewAdapter&lt;ChildBean&gt;{
32 32
33 private class MyViewHolder extends BaseRecyclerViewHolder<ChildBean>{ 33 private class MyViewHolder extends BaseRecyclerViewHolder<ChildBean>{
34 34
35 - TextView textView; 35 + TextView txt_childname,txt_childclass;
36 36
37 37
38 public MyViewHolder(View view) { 38 public MyViewHolder(View view) {
39 super(view); 39 super(view);
40 - textView=view.findViewById(R.id.txt_childname); 40 + txt_childname=view.findViewById(R.id.txt_childname);
  41 + txt_childclass=view.findViewById(R.id.txt_childclass);
41 } 42 }
42 43
43 @Override 44 @Override
44 public void onBindViewHolder(ChildBean object, int position) { 45 public void onBindViewHolder(ChildBean object, int position) {
45 - textView.setText("1234"); 46 + txt_childname.setText(object.getStudentName());
  47 + txt_childclass.setText(object.getSchoolName()+" "+object.getClassName());
  48 +
46 } 49 }
47 50
48 } 51 }
app/src/main/java/com/shunzhi/parent/api/MineApi.java
@@ -12,17 +12,24 @@ import retrofit2.http.POST; @@ -12,17 +12,24 @@ import retrofit2.http.POST;
12 */ 12 */
13 13
14 public interface MineApi { 14 public interface MineApi {
15 -// String url="http://campus.myjxt.com/";  
16 - String url="http://60.190.202.57:1000/"; 15 + // String url="http://campus.myjxt.com/";
  16 + String url = "http://60.190.202.57:1000/";
17 17
18 -@FormUrlEncoded 18 + @FormUrlEncoded
19 @POST("/api/ParentHelper/GetAreaSchool") 19 @POST("/api/ParentHelper/GetAreaSchool")
20 Observable<JsonObject> getSchoolListResult( 20 Observable<JsonObject> getSchoolListResult(
21 - @Field("areaName") String areaName, @Field("Keyword") String Keyword); 21 + @Field("areaName") String areaName, @Field("Keyword") String Keyword);
22 22
23 -@FormUrlEncoded  
24 -@POST("/api/ParentHelper/UpdateParentInfo") 23 + @FormUrlEncoded
  24 + @POST("/api/ParentHelper/UpdateParentInfo")
25 Observable<JsonObject> getChangeInfoResult( 25 Observable<JsonObject> getChangeInfoResult(
26 - @Field("parentName") String parentName, @Field("sex") int sex,@Field("mobile")String mobile); 26 + @Field("parentName") String parentName, @Field("sex") int sex, @Field("mobile") String mobile);
  27 +
  28 + @FormUrlEncoded
  29 + @POST("/api/ParentHelper/BindlingChildren")
  30 + Observable<JsonObject> addChildResult(
  31 + @Field("parentId") int parentId, @Field("mobileFlag") boolean mobileFlag, @Field("cooperateFlag") boolean cooperateFlag
  32 + , @Field("schoolId") int schoolId, @Field("classId") int classId, @Field("studentId") int studentId, @Field("studentUserId") String studentUserId);
27 33
28 } 34 }
  35 +
app/src/main/java/com/shunzhi/parent/bean/ChildBean.java
1 package com.shunzhi.parent.bean; 1 package com.shunzhi.parent.bean;
2 2
  3 +import java.io.Serializable;
  4 +
3 /** 5 /**
4 * Created by Administrator on 2018/3/9 0009. 6 * Created by Administrator on 2018/3/9 0009.
5 */ 7 */
6 8
7 -public class ChildBean {  
8 - private int parentMobile;  
9 - private int parentId; 9 +public class ChildBean implements Serializable{
  10 + private String studentUserId;
  11 + private int parentMobile;
  12 + private int parentId;
10 private boolean mobileFlag; 13 private boolean mobileFlag;
11 private boolean bindingState; 14 private boolean bindingState;
12 private boolean cooperateFlag; 15 private boolean cooperateFlag;
@@ -17,10 +20,18 @@ public class ChildBean { @@ -17,10 +20,18 @@ public class ChildBean {
17 private int classId; 20 private int classId;
18 private String className; 21 private String className;
19 private int studentId; 22 private int studentId;
20 - private int studentUserId; 23 + private String studentName;
21 private String photo; 24 private String photo;
22 private int sex; 25 private int sex;
23 26
  27 + public String getStudentName() {
  28 + return studentName;
  29 + }
  30 +
  31 + public void setStudentName(String studentName) {
  32 + this.studentName = studentName;
  33 + }
  34 +
24 public int getParentMobile() { 35 public int getParentMobile() {
25 return parentMobile; 36 return parentMobile;
26 } 37 }
@@ -117,11 +128,11 @@ public class ChildBean { @@ -117,11 +128,11 @@ public class ChildBean {
117 this.studentId = studentId; 128 this.studentId = studentId;
118 } 129 }
119 130
120 - public int getStudentUserId() { 131 + public String getStudentUserId() {
121 return studentUserId; 132 return studentUserId;
122 } 133 }
123 134
124 - public void setStudentUserId(int studentUserId) { 135 + public void setStudentUserId(String studentUserId) {
125 this.studentUserId = studentUserId; 136 this.studentUserId = studentUserId;
126 } 137 }
127 138
@@ -145,19 +156,20 @@ public class ChildBean { @@ -145,19 +156,20 @@ public class ChildBean {
145 public String toString() { 156 public String toString() {
146 return "ChildBean{" + 157 return "ChildBean{" +
147 "parentMobile='" + parentMobile + '\'' + 158 "parentMobile='" + parentMobile + '\'' +
148 - "parentId='" + parentId + '\'' +  
149 - "mobileFlag='" + mobileFlag + '\'' +  
150 - "bindingState='" + bindingState + '\'' +  
151 - "cooperateFlag='" + cooperateFlag + '\'' +  
152 - "schoolId='" + schoolId + '\'' +  
153 - "schoolName='" + schoolName + '\'' +  
154 - "grade='" + grade + '\'' +  
155 - "gradename='" + gradename + '\'' +  
156 - "classId='" + classId + '\'' +  
157 - "className='" + className + '\'' +  
158 - "studentId='" + studentId + '\'' +  
159 - "studentUserId='" + studentUserId + '\'' +  
160 - "photo='" + photo + '\'' + 159 + ",parentId='" + parentId + '\'' +
  160 + ",mobileFlag='" + mobileFlag + '\'' +
  161 + ",bindingState='" + bindingState + '\'' +
  162 + ",cooperateFlag='" + cooperateFlag + '\'' +
  163 + ",schoolId='" + schoolId + '\'' +
  164 + ",schoolName='" + schoolName + '\'' +
  165 + ",grade='" + grade + '\'' +
  166 + ",gradename='" + gradename + '\'' +
  167 + ",classId='" + classId + '\'' +
  168 + ",className='" + className + '\'' +
  169 + ",studentId='" + studentId + '\'' +
  170 + ",studentName='" + studentName + '\'' +
  171 + ",studentUserId='" + studentUserId + '\'' +
  172 + ",photo='" + photo + '\'' +
161 ", sex=" + sex + 173 ", sex=" + sex +
162 "}"; 174 "}";
163 } 175 }
app/src/main/java/com/shunzhi/parent/bean/CurrentBean.java
@@ -14,8 +14,18 @@ public class CurrentBean implements Serializable{ @@ -14,8 +14,18 @@ public class CurrentBean implements Serializable{
14 private String mobile; 14 private String mobile;
15 private boolean bindSchoolFlag; 15 private boolean bindSchoolFlag;
16 private boolean bindingChildrenFlag; 16 private boolean bindingChildrenFlag;
  17 + private int parentId;
17 private int sex; 18 private int sex;
18 - private List<ChildBean> data; 19 + private List<ChildBean> studentClass;
  20 +
  21 +
  22 + public int getParentId() {
  23 + return parentId;
  24 + }
  25 +
  26 + public void setParentId(int parentId) {
  27 + this.parentId = parentId;
  28 + }
19 29
20 public int getSex() { 30 public int getSex() {
21 return sex; 31 return sex;
@@ -73,25 +83,26 @@ public class CurrentBean implements Serializable{ @@ -73,25 +83,26 @@ public class CurrentBean implements Serializable{
73 this.bindingChildrenFlag = bindingChildrenFlag; 83 this.bindingChildrenFlag = bindingChildrenFlag;
74 } 84 }
75 85
76 - public List<ChildBean> getData() {  
77 - return data; 86 + public List<ChildBean> getStudentClass() {
  87 + return studentClass;
78 } 88 }
79 89
80 - public void setData(List<ChildBean> data) {  
81 - this.data = data; 90 + public void setStudentClass(List<ChildBean> studentClass) {
  91 + this.studentClass = studentClass;
82 } 92 }
83 93
84 @Override 94 @Override
85 public String toString() { 95 public String toString() {
86 return "CurrentBean{" + 96 return "CurrentBean{" +
87 - "userid='" + userid + '\'' +  
88 - "name='" + name + '\'' +  
89 - "image='" + image + '\'' +  
90 - "mobile='" + mobile + '\'' +  
91 - "bindSchoolFlag='" + bindSchoolFlag + '\'' +  
92 - "bindingChildrenFlag='" + bindingChildrenFlag + '\'' +  
93 - "sex='" + sex + '\'' +  
94 - ", data=" + data +  
95 - '}'; 97 + ", userid='" + userid + '\'' +
  98 + ", name='" + name + '\'' +
  99 + ", image='" + image + '\'' +
  100 + ", mobile='" + mobile + '\'' +
  101 + ", parentId='" + parentId + '\'' +
  102 + ", bindSchoolFlag='" + bindSchoolFlag + '\'' +
  103 + ", bindingChildrenFlag='" + bindingChildrenFlag + '\'' +
  104 + ", sex='" + sex + '\'' +
  105 + ", studentClass='" + studentClass +
  106 + "}";
96 } 107 }
97 } 108 }
app/src/main/java/com/shunzhi/parent/contract/mine/MyChildContract.java
1 package com.shunzhi.parent.contract.mine; 1 package com.shunzhi.parent.contract.mine;
2 2
  3 +import com.google.gson.JsonObject;
3 import com.share.mvpsdk.base.BasePresenter; 4 import com.share.mvpsdk.base.BasePresenter;
4 import com.share.mvpsdk.base.IBaseActivity; 5 import com.share.mvpsdk.base.IBaseActivity;
5 import com.share.mvpsdk.base.IBaseModel; 6 import com.share.mvpsdk.base.IBaseModel;
6 import com.shunzhi.parent.bean.ChildBean; 7 import com.shunzhi.parent.bean.ChildBean;
  8 +import com.shunzhi.parent.bean.UserInfo;
7 9
8 import java.util.List; 10 import java.util.List;
9 11
  12 +import io.reactivex.Observable;
  13 +
10 /** 14 /**
11 * Created by Administrator on 2018/3/9 0009. 15 * Created by Administrator on 2018/3/9 0009.
12 */ 16 */
13 17
14 public interface MyChildContract { 18 public interface MyChildContract {
15 19
16 - abstract class MyChildPresenter extends BasePresenter<IMyChildModel,IMyChildView> {  
17 - public abstract void loadChildList(); 20 + abstract class MyChildPresenter extends BasePresenter<IMyChildModel, IMyChildView> {
  21 + public abstract void loadChildList(String mobile, int school_id, String captcha);
  22 + public abstract void addChild(int parentId, boolean mobileFlag,boolean cooperateFlag
  23 + , int schoolId,int classId,int studentId,String studentUserId);
18 24
19 } 25 }
20 26
21 - interface IMyChildModel extends IBaseModel{ 27 + interface IMyChildModel extends IBaseModel {
  28 + Observable<UserInfo> getUserInfo(String mobile, int school_id, String captcha);
  29 + Observable<JsonObject> addChildResult(int parentId, boolean mobileFlag,boolean cooperateFlag
  30 + , int schoolId,int classId,int studentId,String studentUserId);
  31 +
22 32
23 } 33 }
24 - interface IMyChildView extends IBaseActivity{ 34 +
  35 + interface IMyChildView extends IBaseActivity {
25 void updateChilsList(List<ChildBean> list); 36 void updateChilsList(List<ChildBean> list);
26 37
27 } 38 }
app/src/main/java/com/shunzhi/parent/model/mine/MyChildModel.java
1 package com.shunzhi.parent.model.mine; 1 package com.shunzhi.parent.model.mine;
2 2
  3 +import com.google.gson.JsonObject;
3 import com.share.mvpsdk.base.BaseModel; 4 import com.share.mvpsdk.base.BaseModel;
  5 +import com.share.mvpsdk.helper.RetrofitCreateHelper;
  6 +import com.share.mvpsdk.helper.RxHelper;
  7 +import com.shunzhi.parent.api.LoginRegisterApi;
  8 +import com.shunzhi.parent.api.MineApi;
  9 +import com.shunzhi.parent.bean.UserInfo;
4 import com.shunzhi.parent.contract.mine.MyChildContract; 10 import com.shunzhi.parent.contract.mine.MyChildContract;
5 11
  12 +import io.reactivex.Observable;
  13 +
6 /** 14 /**
7 * Created by Administrator on 2018/3/8 0008. 15 * Created by Administrator on 2018/3/8 0008.
8 */ 16 */
@@ -11,4 +19,19 @@ public class MyChildModel extends BaseModel implements MyChildContract.IMyChildM @@ -11,4 +19,19 @@ public class MyChildModel extends BaseModel implements MyChildContract.IMyChildM
11 public static MyChildModel newInstance() { 19 public static MyChildModel newInstance() {
12 return new MyChildModel(); 20 return new MyChildModel();
13 } 21 }
  22 +
  23 + @Override
  24 + public Observable<UserInfo> getUserInfo(String mobile, int school_id, String captcha) {
  25 + return RetrofitCreateHelper.getInstance().createApi(LoginRegisterApi.class,LoginRegisterApi.url).getUserInfo(mobile,school_id,captcha)
  26 + .compose(RxHelper.<UserInfo>rxSchedulerHelper());
  27 + }
  28 +
  29 +
  30 +
  31 + @Override
  32 + public Observable<JsonObject> addChildResult(int parentId, boolean mobileFlag,boolean cooperateFlag
  33 + , int schoolId,int classId,int studentId,String studentUserId) {
  34 + return RetrofitCreateHelper.getInstance().createApi(MineApi.class,MineApi.url).addChildResult(parentId,mobileFlag,cooperateFlag,schoolId
  35 + ,classId,studentId,studentUserId).compose(RxHelper.<JsonObject>rxSchedulerHelper());
  36 + }
14 } 37 }
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
1 package com.shunzhi.parent.presenter.mine; 1 package com.shunzhi.parent.presenter.mine;
2 2
  3 +import android.util.Log;
  4 +
  5 +import com.google.gson.JsonObject;
  6 +import com.share.mvpsdk.utils.OkHttpExceptionUtil;
  7 +import com.share.mvpsdk.utils.ToastUtils;
3 import com.shunzhi.parent.bean.ChildBean; 8 import com.shunzhi.parent.bean.ChildBean;
  9 +import com.shunzhi.parent.bean.CurrentBean;
  10 +import com.shunzhi.parent.bean.UserInfo;
4 import com.shunzhi.parent.contract.mine.MyChildContract; 11 import com.shunzhi.parent.contract.mine.MyChildContract;
5 import com.shunzhi.parent.model.mine.MyChildModel; 12 import com.shunzhi.parent.model.mine.MyChildModel;
6 13
7 -import java.util.ArrayList;  
8 import java.util.List; 14 import java.util.List;
9 15
  16 +import io.reactivex.functions.Consumer;
  17 +import retrofit2.HttpException;
  18 +
10 /** 19 /**
11 * Created by Administrator on 2018/3/8 0008. 20 * Created by Administrator on 2018/3/8 0008.
12 */ 21 */
@@ -24,14 +33,38 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { @@ -24,14 +33,38 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter {
24 } 33 }
25 34
26 @Override 35 @Override
27 - public void loadChildList() {  
28 - ChildBean c=new ChildBean();  
29 - List<ChildBean> l=new ArrayList<>();  
30 - l.add(c);  
31 - l.add(c);  
32 - l.add(c);  
33 - l.add(c);  
34 - l.add(c);  
35 - mIView.updateChilsList(l); 36 + public void loadChildList(String mobile, int school_id, String captcha) {
  37 + mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer<UserInfo>() {
  38 + @Override
  39 + public void accept(UserInfo userInfo) throws Exception {
  40 + CurrentBean currentBean = userInfo.getData();
  41 + List<ChildBean> list = currentBean.getStudentClass();
  42 + mIView.updateChilsList(list);
  43 + }
  44 + }, new Consumer<Throwable>() {
  45 + @Override
  46 + public void accept(Throwable throwable) throws Exception {
  47 + OkHttpExceptionUtil.handOkHttpException((HttpException) throwable);
  48 + }
  49 + }));
  50 +
  51 + }
  52 +
  53 + @Override
  54 + public void addChild(int parentId, boolean mobileFlag, boolean cooperateFlag, int schoolId, int classId, int studentId, String studentUserId) {
  55 + mRxManager.register(mIModel.addChildResult(parentId, mobileFlag, cooperateFlag, schoolId, classId, studentId, studentUserId).subscribe(new Consumer<JsonObject>() {
  56 + @Override
  57 + public void accept(JsonObject jsonObject) throws Exception {
  58 + ToastUtils.showToast(jsonObject.toString());
  59 + }
  60 + }, new Consumer<Throwable>() {
  61 + @Override
  62 + public void accept(Throwable throwable) throws Exception {
  63 +
  64 + }
  65 + }));
  66 +
  67 +
36 } 68 }
  69 +
37 } 70 }
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
@@ -16,6 +16,8 @@ import android.widget.TextView; @@ -16,6 +16,8 @@ import android.widget.TextView;
16 16
17 import com.share.mvpsdk.base.BasePresenter; 17 import com.share.mvpsdk.base.BasePresenter;
18 import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; 18 import com.share.mvpsdk.base.activity.BaseMVPCompatActivity;
  19 +import com.shunzhi.parent.AppConfig;
  20 +import com.shunzhi.parent.AppContext;
19 import com.shunzhi.parent.R; 21 import com.shunzhi.parent.R;
20 import com.shunzhi.parent.adapter.ChildAdapter; 22 import com.shunzhi.parent.adapter.ChildAdapter;
21 import com.shunzhi.parent.bean.ChildBean; 23 import com.shunzhi.parent.bean.ChildBean;
@@ -95,7 +97,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi @@ -95,7 +97,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi
95 97
96 } 98 }
97 }); 99 });
98 - mPresenter.loadChildList(); 100 + mPresenter.loadChildList(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME),0,"");
99 } 101 }
100 102
101 @Override 103 @Override
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
@@ -2,29 +2,88 @@ package com.shunzhi.parent.ui.activity.binding; @@ -2,29 +2,88 @@ package com.shunzhi.parent.ui.activity.binding;
2 2
3 import android.os.Bundle; 3 import android.os.Bundle;
4 import android.support.annotation.NonNull; 4 import android.support.annotation.NonNull;
  5 +import android.util.Log;
  6 +import android.view.View;
  7 +import android.widget.LinearLayout;
  8 +import android.widget.TextView;
5 9
6 import com.share.mvpsdk.base.BasePresenter; 10 import com.share.mvpsdk.base.BasePresenter;
7 import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; 11 import com.share.mvpsdk.base.activity.BaseMVPCompatActivity;
  12 +import com.share.mvpsdk.utils.ToastUtils;
  13 +import com.shunzhi.parent.AppConfig;
  14 +import com.shunzhi.parent.AppContext;
8 import com.shunzhi.parent.R; 15 import com.shunzhi.parent.R;
  16 +import com.shunzhi.parent.bean.ChildBean;
  17 +import com.shunzhi.parent.contract.mine.MyChildContract;
  18 +import com.shunzhi.parent.presenter.mine.MyChildPresenter;
  19 +
  20 +import java.util.List;
9 21
10 /** 22 /**
11 * Created by Administrator on 2018/3/12 0012. 23 * Created by Administrator on 2018/3/12 0012.
12 */ 24 */
13 25
14 -public class CheckInfoActivity extends BaseMVPCompatActivity{ 26 +public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel>
  27 + implements MyChildContract.IMyChildView, View.OnClickListener {
  28 + int school_id;
  29 + LinearLayout iphone_layout;
  30 + TextView child_name, child_sex, child_grade, child_class, add_child, user_mobile;
  31 + ChildBean childBean;
  32 +
15 @NonNull 33 @NonNull
16 @Override 34 @Override
17 public BasePresenter initPresenter() { 35 public BasePresenter initPresenter() {
18 - return null; 36 + return new MyChildPresenter();
19 } 37 }
20 38
21 @Override 39 @Override
22 protected void initView(Bundle savedInstanceState) { 40 protected void initView(Bundle savedInstanceState) {
  41 + iphone_layout = findViewById(R.id.iphone_layout);
  42 + child_name = findViewById(R.id.child_name);
  43 + child_sex = findViewById(R.id.child_sex);
  44 + child_grade = findViewById(R.id.child_grade);
  45 + child_class = findViewById(R.id.child_class);
  46 + add_child = findViewById(R.id.add_child);
  47 + add_child.setOnClickListener(this);
  48 + user_mobile = findViewById(R.id.user_mobile);
23 49
  50 +// school_id = getIntent().getIntExtra("school_id", 0);
  51 +// Log.e("aaaa--==",school_id+"");
  52 + mPresenter.loadChildList(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME), 1, "");
24 } 53 }
25 54
26 @Override 55 @Override
27 protected int getLayoutId() { 56 protected int getLayoutId() {
28 return R.layout.activity_check_info; 57 return R.layout.activity_check_info;
29 } 58 }
  59 +
  60 + @Override
  61 + public void onClick(View v) {
  62 + Log.e("qqqq--==",childBean.getStudentUserId());
  63 + mPresenter.addChild(0, true, true, 0, 0, 0, childBean.getStudentUserId());
  64 + }
  65 +
  66 + @Override
  67 + public void updateChilsList(List<ChildBean> list) {
  68 + if (list != null&&list.size()>0) {
  69 + childBean = list.get(0);
  70 + iphone_layout.setVisibility(View.VISIBLE);
  71 + user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME));
  72 + child_name.setText(childBean.getStudentName());
  73 + int sex = childBean.getSex();
  74 + String sexStr = "未知";
  75 + if (sex == 1) {
  76 + sexStr = "男";
  77 + } else if (sex == 2) {
  78 +
  79 + sexStr = "女";
  80 + }
  81 + child_sex.setText(sexStr);
  82 + child_grade.setText(childBean.getGradename());
  83 + child_class.setText(childBean.getClassName());
  84 + } else {
  85 +
  86 + ToastUtils.showToast("1111111");
  87 + }
  88 + }
30 } 89 }
app/src/main/java/com/shunzhi/parent/ui/activity/binding/InviteCodeActivity.java 0 → 100644
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
  1 +package com.shunzhi.parent.ui.activity.binding;
  2 +
  3 +import android.os.Bundle;
  4 +import android.support.annotation.NonNull;
  5 +import android.view.View;
  6 +
  7 +import com.share.mvpsdk.base.BasePresenter;
  8 +import com.share.mvpsdk.base.activity.BaseMVPCompatActivity;
  9 +import com.shunzhi.parent.R;
  10 +import com.shunzhi.parent.bean.ChildBean;
  11 +import com.shunzhi.parent.contract.mine.MyChildContract;
  12 +import com.shunzhi.parent.presenter.mine.MyChildPresenter;
  13 +
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * Created by Administrator on 2018/3/14 0014.
  18 + */
  19 +
  20 +public class InviteCodeActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel>
  21 + implements MyChildContract.IMyChildView, View.OnClickListener {
  22 +
  23 + @NonNull
  24 + @Override
  25 + public BasePresenter initPresenter() {
  26 + return new MyChildPresenter();
  27 + }
  28 +
  29 + @Override
  30 + public void updateChilsList(List<ChildBean> list) {
  31 +
  32 + }
  33 +
  34 + @Override
  35 + protected void initView(Bundle savedInstanceState) {
  36 +
  37 + }
  38 +
  39 + @Override
  40 + protected int getLayoutId() {
  41 + return R.layout.activity_invitecode;
  42 + }
  43 +
  44 + @Override
  45 + public void onClick(View v) {
  46 +
  47 + }
  48 +}
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
@@ -5,6 +5,7 @@ import android.os.Bundle; @@ -5,6 +5,7 @@ import android.os.Bundle;
5 import android.support.annotation.NonNull; 5 import android.support.annotation.NonNull;
6 import android.support.v7.widget.LinearLayoutManager; 6 import android.support.v7.widget.LinearLayoutManager;
7 import android.support.v7.widget.RecyclerView; 7 import android.support.v7.widget.RecyclerView;
  8 +import android.util.Log;
8 import android.view.View; 9 import android.view.View;
9 import android.widget.TextView; 10 import android.widget.TextView;
10 11
@@ -149,7 +150,8 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity&lt;SchoolListContra @@ -149,7 +150,8 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity&lt;SchoolListContra
149 SortBean currentSortBean = schoolListAdapter.getCurrentSortBean(); 150 SortBean currentSortBean = schoolListAdapter.getCurrentSortBean();
150 if (currentSortBean != null) { 151 if (currentSortBean != null) {
151 if (currentSortBean.getIsNew().equals("0")) { 152 if (currentSortBean.getIsNew().equals("0")) {
152 - startActivity(new Intent().setClass(SelectSchoolActivity.this, CheckInfoActivity.class)); 153 + Log.e("1111-===",currentSortBean.getSchool_id());
  154 + startActivity(new Intent().putExtra("school_id",currentSortBean.getSchool_id()).setClass(SelectSchoolActivity.this, CheckInfoActivity.class));
153 } else { 155 } else {
154 startActivity(new Intent().setClass(SelectSchoolActivity.this,CreateChildInfoActivity.class)); 156 startActivity(new Intent().setClass(SelectSchoolActivity.this,CreateChildInfoActivity.class));
155 } 157 }
app/src/main/res/layout/activity_check_info.xml
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 android:textSize="@dimen/sp_18" /> 28 android:textSize="@dimen/sp_18" />
29 29
30 <TextView 30 <TextView
  31 + android:id="@+id/user_mobile"
31 android:layout_width="match_parent" 32 android:layout_width="match_parent"
32 android:layout_height="wrap_content" 33 android:layout_height="wrap_content"
33 android:layout_marginTop="10dp" 34 android:layout_marginTop="10dp"
@@ -57,7 +58,8 @@ @@ -57,7 +58,8 @@
57 android:text="孩子姓名:" 58 android:text="孩子姓名:"
58 android:textSize="@dimen/sp_16" /> 59 android:textSize="@dimen/sp_16" />
59 60
60 - <EditText 61 + <TextView
  62 + android:id="@+id/child_name"
61 android:layout_width="wrap_content" 63 android:layout_width="wrap_content"
62 android:layout_height="match_parent" 64 android:layout_height="match_parent"
63 android:layout_weight="1" 65 android:layout_weight="1"
@@ -81,7 +83,8 @@ @@ -81,7 +83,8 @@
81 android:text="性 别:" 83 android:text="性 别:"
82 android:textSize="@dimen/sp_16" /> 84 android:textSize="@dimen/sp_16" />
83 85
84 - <EditText 86 + <TextView
  87 + android:id="@+id/child_sex"
85 android:layout_width="wrap_content" 88 android:layout_width="wrap_content"
86 android:layout_height="match_parent" 89 android:layout_height="match_parent"
87 android:layout_weight="1" 90 android:layout_weight="1"
@@ -105,7 +108,8 @@ @@ -105,7 +108,8 @@
105 android:text="年 级:" 108 android:text="年 级:"
106 android:textSize="@dimen/sp_16" /> 109 android:textSize="@dimen/sp_16" />
107 110
108 - <EditText 111 + <TextView
  112 + android:id="@+id/child_grade"
109 android:layout_width="wrap_content" 113 android:layout_width="wrap_content"
110 android:layout_height="match_parent" 114 android:layout_height="match_parent"
111 android:layout_weight="1" 115 android:layout_weight="1"
@@ -129,7 +133,8 @@ @@ -129,7 +133,8 @@
129 android:text="班 级:" 133 android:text="班 级:"
130 android:textSize="@dimen/sp_16" /> 134 android:textSize="@dimen/sp_16" />
131 135
132 - <EditText 136 + <TextView
  137 + android:id="@+id/child_class"
133 android:layout_width="wrap_content" 138 android:layout_width="wrap_content"
134 android:layout_height="match_parent" 139 android:layout_height="match_parent"
135 android:layout_weight="1" 140 android:layout_weight="1"