Commit 1ae96a188b7ba13987cedc4a4646193d3df85ec9
Exists in
yxb_dev
and in
1 other branch
Merge branch 'developer' into yxb_dev
Showing
2 changed files
with
13 additions
and
38 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
| @@ -4,6 +4,7 @@ import android.content.Intent; | @@ -4,6 +4,7 @@ import android.content.Intent; | ||
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
| 6 | import android.text.TextUtils; | 6 | import android.text.TextUtils; |
| 7 | +import android.util.Log; | ||
| 7 | import android.view.Gravity; | 8 | import android.view.Gravity; |
| 8 | import android.view.LayoutInflater; | 9 | import android.view.LayoutInflater; |
| 9 | import android.view.View; | 10 | import android.view.View; |
| @@ -83,40 +84,11 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | @@ -83,40 +84,11 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | ||
| 83 | public void onClick(View v) { | 84 | public void onClick(View v) { |
| 84 | if (!TextUtils.isEmpty(child_name.getText()) && !TextUtils.isEmpty(child_sex.getText()) | 85 | if (!TextUtils.isEmpty(child_name.getText()) && !TextUtils.isEmpty(child_sex.getText()) |
| 85 | && !TextUtils.isEmpty(child_grade.getText()) && !TextUtils.isEmpty(child_class.getText())) { | 86 | && !TextUtils.isEmpty(child_grade.getText()) && !TextUtils.isEmpty(child_class.getText())) { |
| 86 | - if (isNew == 0) { | ||
| 87 | - mPresenter.addChild(0,"",Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), true, true, 0, 0, studentId,""); | 87 | + if ("".equals(captcha)) { |
| 88 | + mPresenter.addChild(0, "", Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), true, true, 0, 0, studentId, ""); | ||
| 88 | } else { | 89 | } else { |
| 89 | - mPresenter.addChild(0,"",Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), false, true, 0, classId, studentId, ""); | 90 | + mPresenter.addChild(0, "", Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), false, true, 0, classId, studentId, ""); |
| 90 | } | 91 | } |
| 91 | - } else { | ||
| 92 | - final PopupWindow popupWindow = new PopupWindow(); | ||
| 93 | - popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 94 | - popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | ||
| 95 | - backgroundAlpha(0.5f); | ||
| 96 | - View view = LayoutInflater.from(this).inflate(R.layout.dialog_view, null); | ||
| 97 | - TextView dialog_info = view.findViewById(R.id.dialog_info); | ||
| 98 | - dialog_info.setText("当前无可绑定孩子,点击确认返回孩子列表"); | ||
| 99 | - dialog_info.setGravity(Gravity.CENTER); | ||
| 100 | - TextView right_btn = view.findViewById(R.id.right_btn); | ||
| 101 | - right_btn.setOnClickListener(new View.OnClickListener() { | ||
| 102 | - @Override | ||
| 103 | - public void onClick(View v) { | ||
| 104 | - popupWindow.dismiss(); | ||
| 105 | - startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(CheckInfoActivity.this, MyChildActivity.class)); | ||
| 106 | - finish(); | ||
| 107 | - } | ||
| 108 | - }); | ||
| 109 | - TextView cancel_btn = view.findViewById(R.id.cancel_btn); | ||
| 110 | - cancel_btn.setOnClickListener(new View.OnClickListener() { | ||
| 111 | - @Override | ||
| 112 | - public void onClick(View v) { | ||
| 113 | - popupWindow.dismiss(); | ||
| 114 | - backgroundAlpha(1f); | ||
| 115 | - } | ||
| 116 | - }); | ||
| 117 | - | ||
| 118 | - popupWindow.setContentView(view); | ||
| 119 | - popupWindow.showAtLocation(iphone_layout, Gravity.CENTER, 0, 0); | ||
| 120 | } | 92 | } |
| 121 | } | 93 | } |
| 122 | 94 | ||
| @@ -142,8 +114,6 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | @@ -142,8 +114,6 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | ||
| 142 | child_sex.setText(sexStr); | 114 | child_sex.setText(sexStr); |
| 143 | child_grade.setText(childBean.getGradename()); | 115 | child_grade.setText(childBean.getGradename()); |
| 144 | child_class.setText(childBean.getClassName()); | 116 | child_class.setText(childBean.getClassName()); |
| 145 | - } else { | ||
| 146 | - ToastUtils.showToast("该账号下无需要绑定的孩子"); | ||
| 147 | } | 117 | } |
| 148 | if (currentBean.isNew() == 1) { | 118 | if (currentBean.isNew() == 1) { |
| 149 | iphone_layout.setVisibility(View.INVISIBLE); | 119 | iphone_layout.setVisibility(View.INVISIBLE); |
| @@ -152,11 +122,11 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | @@ -152,11 +122,11 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | ||
| 152 | } | 122 | } |
| 153 | 123 | ||
| 154 | @Override | 124 | @Override |
| 155 | - public void addChildSuccess(String account,String password) { | 125 | + public void addChildSuccess(String account, String password) { |
| 156 | // WebViewActivity.start_show(CheckInfoActivity.this,AppConfig.BINDING_SUCCESS_HEZUO); | 126 | // WebViewActivity.start_show(CheckInfoActivity.this,AppConfig.BINDING_SUCCESS_HEZUO); |
| 157 | WebViewActivity.getInstance(CheckInfoActivity.this, | 127 | WebViewActivity.getInstance(CheckInfoActivity.this, |
| 158 | - AppConfig.BASE_URL_ORDER+"/RecommendOrder.aspx?userid="+ | ||
| 159 | - AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID),AppConfig.BINDING_SUCCESS_HEZUO); | 128 | + AppConfig.BASE_URL_ORDER + "/RecommendOrder.aspx?userid=" + |
| 129 | + AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID), AppConfig.BINDING_SUCCESS_HEZUO); | ||
| 160 | finish(); | 130 | finish(); |
| 161 | 131 | ||
| 162 | } | 132 | } |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
| @@ -237,7 +237,12 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -237,7 +237,12 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
| 237 | @Override | 237 | @Override |
| 238 | public void showChild(CurrentBean currentBean) { | 238 | public void showChild(CurrentBean currentBean) { |
| 239 | if (currentBean.isNew() == 0) { | 239 | if (currentBean.isNew() == 0) { |
| 240 | - startActivity(new Intent().putExtra("school_id", schoolId).setClass(SelectSchoolActivity.this, CheckInfoActivity.class)); | 240 | + |
| 241 | + if (currentBean.getStudentClass().size() > 0 && currentBean.getStudentClass() != null) { | ||
| 242 | + startActivity(new Intent().putExtra("school_id", schoolId).setClass(SelectSchoolActivity.this, CheckInfoActivity.class)); | ||
| 243 | + } else { | ||
| 244 | + startActivity(new Intent().putExtra("school_id", schoolId).setClass(SelectSchoolActivity.this, InviteCodeActivity.class)); | ||
| 245 | + } | ||
| 241 | } else { | 246 | } else { |
| 242 | startActivity(new Intent().putExtra("school_id", schoolId).setClass(SelectSchoolActivity.this, InviteCodeActivity.class)); | 247 | startActivity(new Intent().putExtra("school_id", schoolId).setClass(SelectSchoolActivity.this, InviteCodeActivity.class)); |
| 243 | } | 248 | } |