Commit 2c3dd8852e73793ac937be0f84cacb5253716288
1 parent
a97b79d9
Exists in
yxb_dev
and in
2 other branches
no message
Showing
13 changed files
with
230 additions
and
11 deletions
 
Show diff stats
app/src/main/AndroidManifest.xml
| ... | ... | @@ -108,6 +108,9 @@ | 
| 108 | 108 | <activity | 
| 109 | 109 | android:name=".ui.activity.binding.InviteCodeActivity" | 
| 110 | 110 | android:screenOrientation="portrait" /> | 
| 111 | + <activity | |
| 112 | + android:name=".ui.activity.WebViewActivity" | |
| 113 | + android:screenOrientation="portrait" /> | |
| 111 | 114 | <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity" /> | 
| 112 | 115 | <activity android:name=".ui.activity.orderdetail.OrderDetailActivity"></activity> | 
| 113 | 116 | </application> | ... | ... | 
app/src/main/java/com/shunzhi/parent/AppConfig.java
| ... | ... | @@ -22,6 +22,9 @@ public class AppConfig { | 
| 22 | 22 | public static String USER_SEX = "user_sex"; | 
| 23 | 23 | public static String USER_IMAGE = "user_image"; | 
| 24 | 24 | public static String PARENT_ID = "parent_id"; | 
| 25 | + public static int BINDING_SUCCESS_HEZUO = 1; | |
| 26 | + public static int BINDING_SUCCESS_NOT= 2; | |
| 27 | + public static int ORDER_CENTER = 3; | |
| 25 | 28 | |
| 26 | 29 | |
| 27 | 30 | //默认日志保存的路径 | ... | ... | 
app/src/main/java/com/shunzhi/parent/bean/ChildBean.java
| ... | ... | @@ -27,6 +27,13 @@ public class ChildBean implements Serializable { | 
| 27 | 27 | private String cityName; | 
| 28 | 28 | private int sex; | 
| 29 | 29 | |
| 30 | + public String getCityName() { | |
| 31 | + return cityName; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setCityName(String cityName) { | |
| 35 | + this.cityName = cityName; | |
| 36 | + } | |
| 30 | 37 | |
| 31 | 38 | public String getAreaName() { | 
| 32 | 39 | return areaName; | 
| ... | ... | @@ -192,6 +199,7 @@ public class ChildBean implements Serializable { | 
| 192 | 199 | ",photo='" + photo + '\'' + | 
| 193 | 200 | ",studentCode='" + studentCode + '\'' + | 
| 194 | 201 | ",areaName='" + areaName + '\'' + | 
| 202 | + ",cityName='" + cityName + '\'' + | |
| 195 | 203 | ", sex=" + sex + | 
| 196 | 204 | "}"; | 
| 197 | 205 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/ChildDetialActivity.java
| ... | ... | @@ -44,7 +44,7 @@ public class ChildDetialActivity extends BaseCompatActivity { | 
| 44 | 44 | child_name.setText(childBean.getStudentName()); | 
| 45 | 45 | child_school.setText(childBean.getSchoolName()); | 
| 46 | 46 | child_class.setText(childBean.getClassName()); | 
| 47 | - school_area.setText(childBean.getAreaName()); | |
| 47 | + school_area.setText(childBean.getCityName()+childBean.getAreaName()); | |
| 48 | 48 | student_code.setText(childBean.getStudentCode()); | 
| 49 | 49 | |
| 50 | 50 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
| ... | ... | @@ -94,8 +94,9 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | 
| 94 | 94 | @Override | 
| 95 | 95 | public void onClick(View v) { | 
| 96 | 96 | popupWindow.dismiss(); | 
| 97 | + backgroundAlpha(1f); | |
| 97 | 98 | mPresenter.unBinndingResult(Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)) | 
| 98 | - , currlist.get(menuBridge.getPosition()).getStudentId()); | |
| 99 | + , currlist.get(menuBridge.getAdapterPosition()).getStudentId()); | |
| 99 | 100 | } | 
| 100 | 101 | }); | 
| 101 | 102 | popupWindow.setContentView(view); | 
| ... | ... | @@ -123,6 +124,7 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | 
| 123 | 124 | |
| 124 | 125 | @Override | 
| 125 | 126 | public void updateChildList(CurrentBean currentBean) { | 
| 127 | + currlist.clear(); | |
| 126 | 128 | List<ChildBean> list = currentBean.getStudentClass(); | 
| 127 | 129 | currlist.addAll(list); | 
| 128 | 130 | if (childAdapter == null) { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/WebViewActivity.java
0 → 100644
| ... | ... | @@ -0,0 +1,79 @@ | 
| 1 | +package com.shunzhi.parent.ui.activity; | |
| 2 | + | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Intent; | |
| 5 | +import android.os.Bundle; | |
| 6 | +import android.view.View; | |
| 7 | +import android.webkit.WebViewClient; | |
| 8 | +import android.widget.LinearLayout; | |
| 9 | +import android.widget.TextView; | |
| 10 | + | |
| 11 | +import com.share.mvpsdk.base.activity.BaseCompatActivity; | |
| 12 | +import com.share.mvpsdk.widgets.NestedScrollWebView; | |
| 13 | +import com.shunzhi.parent.AppConfig; | |
| 14 | +import com.shunzhi.parent.R; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * Created by Administrator on 2018/3/16 0016. | |
| 18 | + */ | |
| 19 | + | |
| 20 | +public class WebViewActivity extends BaseCompatActivity { | |
| 21 | + TextView close_btn, title_web, tv_info, zuoye; | |
| 22 | + LinearLayout binding_success, binding_success2; | |
| 23 | + NestedScrollWebView webView; | |
| 24 | + public int type; //BINDING_SUCCESS_HEZUO=1,INDING_SUCCESS_NOT=2, ORDER_CENTER=3 | |
| 25 | + | |
| 26 | + | |
| 27 | + public static void start_show(Activity activity, int type) { | |
| 28 | + Intent intent = new Intent(activity, WebViewActivity.class); | |
| 29 | + intent.putExtra("type", type); | |
| 30 | + activity.startActivity(intent); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + protected void initView(Bundle savedInstanceState) { | |
| 35 | + type = getIntent().getIntExtra("type", 0); | |
| 36 | + binding_success = findViewById(R.id.binding_success); | |
| 37 | + binding_success2 = findViewById(R.id.binding_success2); | |
| 38 | + close_btn = findViewById(R.id.close_btn); | |
| 39 | + title_web = findViewById(R.id.title_web); | |
| 40 | + tv_info = findViewById(R.id.tv_info); | |
| 41 | + zuoye = findViewById(R.id.zuoye); | |
| 42 | + close_btn.setOnClickListener(new View.OnClickListener() { | |
| 43 | + @Override | |
| 44 | + public void onClick(View v) { | |
| 45 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(WebViewActivity.this, MyChildActivity.class)); | |
| 46 | + } | |
| 47 | + }); | |
| 48 | + | |
| 49 | + | |
| 50 | + webView = findViewById(R.id.webView); | |
| 51 | + webView.setWebViewClient(new WebViewClient()); | |
| 52 | + webView.loadUrl("http://blog.csdn.net/lee4755026/article/details/52161035"); | |
| 53 | + if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | |
| 54 | + binding_success.setVisibility(View.VISIBLE); | |
| 55 | + binding_success2.setVisibility(View.GONE); | |
| 56 | + title_web.setVisibility(View.GONE); | |
| 57 | + } else if (type == AppConfig.BINDING_SUCCESS_NOT) { | |
| 58 | + binding_success2.setVisibility(View.VISIBLE); | |
| 59 | + binding_success.setVisibility(View.GONE); | |
| 60 | + title_web.setVisibility(View.GONE); | |
| 61 | + initInfo(); | |
| 62 | + } else if (type == AppConfig.ORDER_CENTER) { | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void initInfo() { | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + protected int getLayoutId() { | |
| 77 | + return R.layout.activity_webview; | |
| 78 | + } | |
| 79 | +} | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
| ... | ... | @@ -25,6 +25,7 @@ import com.shunzhi.parent.bean.CurrentBean; | 
| 25 | 25 | import com.shunzhi.parent.contract.mine.MyChildContract; | 
| 26 | 26 | import com.shunzhi.parent.presenter.mine.MyChildPresenter; | 
| 27 | 27 | import com.shunzhi.parent.ui.activity.MyChildActivity; | 
| 28 | +import com.shunzhi.parent.ui.activity.WebViewActivity; | |
| 28 | 29 | |
| 29 | 30 | import java.util.List; | 
| 30 | 31 | |
| ... | ... | @@ -81,7 +82,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | 
| 81 | 82 | if (!TextUtils.isEmpty(child_name.getText()) && !TextUtils.isEmpty(child_sex.getText()) | 
| 82 | 83 | && !TextUtils.isEmpty(child_grade.getText()) && !TextUtils.isEmpty(child_class.getText())) { | 
| 83 | 84 | if (isNew == 0) { | 
| 84 | - mPresenter.addChild(0, true, true, 0, 0, 0, childBean.getStudentUserId()); | |
| 85 | + mPresenter.addChild(Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), true, true, 0, 0, studentId,""); | |
| 85 | 86 | } else { | 
| 86 | 87 | mPresenter.addChild(Integer.parseInt(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.PARENT_ID)), false, true, 0, classId, studentId, ""); | 
| 87 | 88 | } | 
| ... | ... | @@ -98,7 +99,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | 
| 98 | 99 | right_btn.setOnClickListener(new View.OnClickListener() { | 
| 99 | 100 | @Override | 
| 100 | 101 | public void onClick(View v) { | 
| 101 | - startActivity(new Intent().setClass(CheckInfoActivity.this, MyChildActivity.class)); | |
| 102 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(CheckInfoActivity.this, MyChildActivity.class)); | |
| 102 | 103 | finish(); | 
| 103 | 104 | } | 
| 104 | 105 | }); | 
| ... | ... | @@ -149,7 +150,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | 
| 149 | 150 | |
| 150 | 151 | @Override | 
| 151 | 152 | public void addChildSuccess() { | 
| 152 | - startActivity(new Intent().setClass(CheckInfoActivity.this, MyChildActivity.class)); | |
| 153 | + WebViewActivity.start_show(CheckInfoActivity.this,AppConfig.BINDING_SUCCESS_HEZUO); | |
| 153 | 154 | finish(); | 
| 154 | 155 | } | 
| 155 | 156 | |
| ... | ... | @@ -173,7 +174,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | 
| 173 | 174 | right_btn.setOnClickListener(new View.OnClickListener() { | 
| 174 | 175 | @Override | 
| 175 | 176 | public void onClick(View v) { | 
| 176 | - startActivity(new Intent().setClass(CheckInfoActivity.this, MyChildActivity.class)); | |
| 177 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(CheckInfoActivity.this, MyChildActivity.class)); | |
| 177 | 178 | finish(); | 
| 178 | 179 | } | 
| 179 | 180 | }); | 
| ... | ... | @@ -183,7 +184,7 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | 
| 183 | 184 | @Override | 
| 184 | 185 | public void onClick(View v) { | 
| 185 | 186 | popupWindow.dismiss(); | 
| 186 | - startActivity(new Intent().putExtra("school_id", school_id).setClass(CheckInfoActivity.this, InviteCodeActivity.class)); | |
| 187 | + startActivity(new Intent().putExtra("school_id", school_id).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(CheckInfoActivity.this, InviteCodeActivity.class)); | |
| 187 | 188 | finish(); | 
| 188 | 189 | } | 
| 189 | 190 | }); | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/binding/InviteCodeActivity.java
| ... | ... | @@ -3,12 +3,14 @@ package com.shunzhi.parent.ui.activity.binding; | 
| 3 | 3 | import android.content.Intent; | 
| 4 | 4 | import android.os.Bundle; | 
| 5 | 5 | import android.support.annotation.NonNull; | 
| 6 | +import android.text.TextUtils; | |
| 6 | 7 | import android.view.View; | 
| 7 | 8 | import android.widget.EditText; | 
| 8 | 9 | import android.widget.TextView; | 
| 9 | 10 | |
| 10 | 11 | import com.share.mvpsdk.base.BasePresenter; | 
| 11 | 12 | import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; | 
| 13 | +import com.share.mvpsdk.utils.ToastUtils; | |
| 12 | 14 | import com.shunzhi.parent.R; | 
| 13 | 15 | import com.shunzhi.parent.presenter.mine.MyChildPresenter; | 
| 14 | 16 | |
| ... | ... | @@ -44,8 +46,11 @@ public class InviteCodeActivity extends BaseMVPCompatActivity { | 
| 44 | 46 | add_child.setOnClickListener(new View.OnClickListener() { | 
| 45 | 47 | @Override | 
| 46 | 48 | public void onClick(View v) { | 
| 47 | - startActivity(new Intent().putExtra("school_id",school_id).putExtra("captcha", et_invite_code.getText().toString().trim()).setClass(InviteCodeActivity.this, CheckInfoActivity.class)); | |
| 48 | - } | |
| 49 | + if(!TextUtils.isEmpty(et_invite_code.getText())) | |
| 50 | + startActivity(new Intent().putExtra("school_id", school_id).putExtra("captcha", et_invite_code.getText().toString().trim()).setClass(InviteCodeActivity.this, CheckInfoActivity.class)); | |
| 51 | + else | |
| 52 | + ToastUtils.showToast("请填写邀请码"); | |
| 53 | + } | |
| 49 | 54 | }); | 
| 50 | 55 | |
| 51 | 56 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
| ... | ... | @@ -94,7 +94,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | 
| 94 | 94 | } | 
| 95 | 95 | |
| 96 | 96 | private void setSchoolList() { | 
| 97 | - mPresenter.schoolListResult("杭州", ""); | |
| 97 | + mPresenter.schoolListResult(AppContext.getInstance().cityName, ""); | |
| 98 | 98 | } | 
| 99 | 99 | |
| 100 | 100 | @Override | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
| ... | ... | @@ -102,7 +102,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | 
| 102 | 102 | et_password_new = view.findViewById(R.id.et_password_new); | 
| 103 | 103 | et_password_new.addTextChangedListener(textWatcher); | 
| 104 | 104 | |
| 105 | - mPresenter.loginResult("18358575338", "575338"); | |
| 105 | + mPresenter.loginResult("18358585335", "123456"); | |
| 106 | 106 | if ("登录".equals(typepage)) { | 
| 107 | 107 | idCodeLayout.setVisibility(View.GONE); | 
| 108 | 108 | passwordLayout_new.setVisibility(View.GONE); | ... | ... | 
655 Bytes
5.98 KB
| ... | ... | @@ -0,0 +1,118 @@ | 
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical" | |
| 6 | + android:background="@color/bgColor"> | |
| 7 | + <RelativeLayout | |
| 8 | + android:layout_width="match_parent" | |
| 9 | + android:background="@color/back_top" | |
| 10 | + android:layout_height="?android:actionBarSize" | |
| 11 | + android:orientation="horizontal" | |
| 12 | + > | |
| 13 | + <TextView | |
| 14 | + android:id="@+id/close_btn" | |
| 15 | + android:layout_width="30dp" | |
| 16 | + android:layout_height="30dp" | |
| 17 | + android:layout_marginLeft="10dp" | |
| 18 | + android:layout_centerVertical="true" | |
| 19 | + android:background="@drawable/close" | |
| 20 | + /> | |
| 21 | + <TextView | |
| 22 | + android:id="@+id/title_web" | |
| 23 | + android:layout_width="wrap_content" | |
| 24 | + android:layout_height="wrap_content" | |
| 25 | + android:text="订购中心" | |
| 26 | + android:textSize="@dimen/txtsize_title" | |
| 27 | + android:layout_centerInParent="true" | |
| 28 | + android:visibility="gone" | |
| 29 | + android:textColor="@color/textColor" | |
| 30 | + | |
| 31 | + /> | |
| 32 | + | |
| 33 | + </RelativeLayout> | |
| 34 | + | |
| 35 | + <LinearLayout | |
| 36 | + android:id="@+id/binding_success" | |
| 37 | + android:layout_width="match_parent" | |
| 38 | + android:layout_height="wrap_content" | |
| 39 | + android:gravity="center" | |
| 40 | + android:background="@color/white" | |
| 41 | + android:layout_marginLeft="20dp" | |
| 42 | + android:padding="30dp" | |
| 43 | + android:layout_marginRight="20dp" | |
| 44 | + | |
| 45 | + > | |
| 46 | + | |
| 47 | + <ImageView | |
| 48 | + android:layout_width="40dp" | |
| 49 | + android:layout_height="40dp" | |
| 50 | + android:background="@drawable/success_big" /> | |
| 51 | + | |
| 52 | + <TextView | |
| 53 | + android:layout_width="wrap_content" | |
| 54 | + android:layout_height="match_parent" | |
| 55 | + android:layout_marginLeft="20dp" | |
| 56 | + android:text="绑定成功" | |
| 57 | + android:gravity="center" | |
| 58 | + android:textColor="@color/textColor" | |
| 59 | + android:textSize="@dimen/txtsize_headline" /> | |
| 60 | + | |
| 61 | + </LinearLayout> | |
| 62 | + <LinearLayout | |
| 63 | + android:id="@+id/binding_success2" | |
| 64 | + android:visibility="gone" | |
| 65 | + android:layout_width="match_parent" | |
| 66 | + android:layout_height="wrap_content" | |
| 67 | + android:gravity="center" | |
| 68 | + android:background="@color/white" | |
| 69 | + android:layout_marginLeft="20dp" | |
| 70 | + android:padding="30dp" | |
| 71 | + android:orientation="vertical" | |
| 72 | + android:layout_marginRight="20dp" | |
| 73 | + | |
| 74 | + > | |
| 75 | + <TextView | |
| 76 | + android:id="@+id/tv_info" | |
| 77 | + android:layout_width="wrap_content" | |
| 78 | + android:layout_height="match_parent" | |
| 79 | + android:layout_marginLeft="20dp" | |
| 80 | + android:text="生成孩子“汇作业”账号为:sz1803081515,初始密码为:sz1803081515(与账号相同)。孩子可以下载“汇作业”app进行使用" | |
| 81 | + android:gravity="center" | |
| 82 | + android:textColor="@color/textColor" | |
| 83 | + android:textSize="@dimen/txtsize_headline" /> | |
| 84 | + <LinearLayout | |
| 85 | + android:layout_width="match_parent" | |
| 86 | + android:layout_height="wrap_content" | |
| 87 | + android:layout_marginTop="10dp" | |
| 88 | + android:gravity="center" | |
| 89 | + > | |
| 90 | + <TextView | |
| 91 | + android:layout_width="wrap_content" | |
| 92 | + android:layout_height="match_parent" | |
| 93 | + android:layout_marginLeft="20dp" | |
| 94 | + android:text="下载地址:" | |
| 95 | + android:textColor="@color/textColor" | |
| 96 | + android:textSize="@dimen/txtsize_headline" /> | |
| 97 | + <TextView | |
| 98 | + android:id="@+id/zuoye" | |
| 99 | + android:layout_width="wrap_content" | |
| 100 | + android:layout_height="match_parent" | |
| 101 | + android:layout_marginLeft="20dp" | |
| 102 | + android:text="汇作业" | |
| 103 | + android:gravity="center" | |
| 104 | + android:textColor="@color/textBlue" | |
| 105 | + android:textSize="@dimen/txtsize_headline" /> | |
| 106 | + </LinearLayout> | |
| 107 | + | |
| 108 | + </LinearLayout> | |
| 109 | + <com.share.mvpsdk.widgets.NestedScrollWebView | |
| 110 | + android:id="@+id/webView" | |
| 111 | + android:layout_height="match_parent" | |
| 112 | + android:layout_width="match_parent" | |
| 113 | + android:layout_marginTop="20dp" | |
| 114 | + android:layout_marginRight="20dp" | |
| 115 | + android:layout_marginLeft="20dp" | |
| 116 | + /> | |
| 117 | + | |
| 118 | +</LinearLayout> | ... | ... |