Commit b8df71fe29786f75df4a43d231ea964313294165
Exists in
yxb_dev
and in
2 other branches
Merge branch 'yxb_dev' of http://git.shunzhi.net/taohd/parentwork into developer
# Conflicts: # .idea/modules.xml # app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
Showing
23 changed files
with
321 additions
and
85 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -22,7 +22,10 @@ public class AppConfig { | @@ -22,7 +22,10 @@ public class AppConfig { | ||
22 | public static String USER_SEX = "user_sex"; | 22 | public static String USER_SEX = "user_sex"; |
23 | public static String USER_IMAGE = "user_image"; | 23 | public static String USER_IMAGE = "user_image"; |
24 | public static String PARENT_ID = "parent_id"; | 24 | public static String PARENT_ID = "parent_id"; |
25 | + | ||
26 | + | ||
25 | public static boolean ISLOGIN = false; | 27 | public static boolean ISLOGIN = false; |
28 | + public static boolean ISBINDING = false; | ||
26 | 29 | ||
27 | public static int BINDING_SUCCESS_HEZUO = 1; | 30 | public static int BINDING_SUCCESS_HEZUO = 1; |
28 | public static int BINDING_SUCCESS_NOT = 2; | 31 | public static int BINDING_SUCCESS_NOT = 2; |
app/src/main/java/com/shunzhi/parent/adapter/ChildAdapter.java
@@ -11,9 +11,12 @@ import android.widget.TextView; | @@ -11,9 +11,12 @@ import android.widget.TextView; | ||
11 | import com.google.gson.Gson; | 11 | import com.google.gson.Gson; |
12 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 12 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
14 | +import com.shunzhi.parent.AppConfig; | ||
15 | +import com.shunzhi.parent.AppContext; | ||
14 | import com.shunzhi.parent.R; | 16 | import com.shunzhi.parent.R; |
15 | import com.shunzhi.parent.bean.ChildBean; | 17 | import com.shunzhi.parent.bean.ChildBean; |
16 | import com.shunzhi.parent.ui.activity.ChildDetialActivity; | 18 | import com.shunzhi.parent.ui.activity.ChildDetialActivity; |
19 | +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; | ||
17 | 20 | ||
18 | /** | 21 | /** |
19 | * Created by Administrator on 2018/3/9 0009. | 22 | * Created by Administrator on 2018/3/9 0009. |
@@ -37,12 +40,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter<ChildBean> { | @@ -37,12 +40,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter<ChildBean> { | ||
37 | private class MyViewHolder extends BaseRecyclerViewHolder<ChildBean> { | 40 | private class MyViewHolder extends BaseRecyclerViewHolder<ChildBean> { |
38 | 41 | ||
39 | TextView txt_childname, txt_childclass; | 42 | TextView txt_childname, txt_childclass; |
43 | + TextView go_buy; | ||
40 | 44 | ||
41 | 45 | ||
42 | public MyViewHolder(View view) { | 46 | public MyViewHolder(View view) { |
43 | super(view); | 47 | super(view); |
44 | txt_childname = view.findViewById(R.id.txt_childname); | 48 | txt_childname = view.findViewById(R.id.txt_childname); |
45 | txt_childclass = view.findViewById(R.id.txt_childclass); | 49 | txt_childclass = view.findViewById(R.id.txt_childclass); |
50 | + go_buy = view.findViewById(R.id.go_buy); | ||
51 | + | ||
46 | } | 52 | } |
47 | 53 | ||
48 | @Override | 54 | @Override |
@@ -57,6 +63,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter<ChildBean> { | @@ -57,6 +63,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter<ChildBean> { | ||
57 | context.startActivity(new Intent().putExtra("childJson", jsonString).setClass(context, ChildDetialActivity.class)); | 63 | context.startActivity(new Intent().putExtra("childJson", jsonString).setClass(context, ChildDetialActivity.class)); |
58 | } | 64 | } |
59 | }); | 65 | }); |
66 | + | ||
67 | + go_buy.setOnClickListener(new View.OnClickListener() { | ||
68 | + @Override | ||
69 | + public void onClick(View v) { | ||
70 | + WebViewActivity.getInstance(context, | ||
71 | + AppConfig.BASE_URL_ORDER+"/ParentOrderCenter.aspx?userid="+ | ||
72 | + AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID),AppConfig.ORDER_CENTER); | ||
73 | + } | ||
74 | + }); | ||
60 | } | 75 | } |
61 | 76 | ||
62 | } | 77 | } |
app/src/main/java/com/shunzhi/parent/adapter/MyConsultAdapter.java
@@ -12,14 +12,13 @@ import android.widget.TextView; | @@ -12,14 +12,13 @@ import android.widget.TextView; | ||
12 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 12 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
14 | import com.shunzhi.parent.R; | 14 | import com.shunzhi.parent.R; |
15 | -import com.shunzhi.parent.bean.MyConsultBean; | ||
16 | -import com.shunzhi.parent.ui.activity.consult.ConsultTwoLevelActivity; | 15 | +import com.shunzhi.parent.bean.channel.ChannelContextBean; |
17 | 16 | ||
18 | /** | 17 | /** |
19 | * Created by ToaHanDong on 2018/3/14. | 18 | * Created by ToaHanDong on 2018/3/14. |
20 | */ | 19 | */ |
21 | 20 | ||
22 | -public class MyConsultAdapter extends BaseRecyclerViewAdapter<MyConsultBean> { | 21 | +public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean> { |
23 | 22 | ||
24 | private Context mContext=null; | 23 | private Context mContext=null; |
25 | 24 | ||
@@ -41,7 +40,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<MyConsultBean> { | @@ -41,7 +40,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<MyConsultBean> { | ||
41 | return new MyConsultViewHolder(view); | 40 | return new MyConsultViewHolder(view); |
42 | } | 41 | } |
43 | 42 | ||
44 | - private class MyConsultViewHolder extends BaseRecyclerViewHolder<MyConsultBean>{ | 43 | + private class MyConsultViewHolder extends BaseRecyclerViewHolder<ChannelContextBean>{ |
45 | 44 | ||
46 | TextView tvConsultTitle, tvConsultContent, tvPingLunNums, tvZhuanFaNums; | 45 | TextView tvConsultTitle, tvConsultContent, tvPingLunNums, tvZhuanFaNums; |
47 | ImageView iv_consult; | 46 | ImageView iv_consult; |
@@ -55,11 +54,11 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<MyConsultBean> { | @@ -55,11 +54,11 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<MyConsultBean> { | ||
55 | } | 54 | } |
56 | 55 | ||
57 | @Override | 56 | @Override |
58 | - public void onBindViewHolder(MyConsultBean object, int position) { | ||
59 | - tvConsultContent.setText(object.consultContent); | ||
60 | - tvConsultTitle.setText(object.consultTitle); | ||
61 | - tvPingLunNums.setText(object.consultCounts); | ||
62 | - tvZhuanFaNums.setText(object.consultZhuanfaCounts); | 57 | + public void onBindViewHolder(ChannelContextBean object, int position) { |
58 | + tvConsultContent.setText(object.getContent()); | ||
59 | + tvConsultTitle.setText(object.getTitle()); | ||
60 | +// tvPingLunNums.setText(object.getForwardingNum()); | ||
61 | +// tvZhuanFaNums.setText(object.getTalkNum()); | ||
63 | } | 62 | } |
64 | } | 63 | } |
65 | } | 64 | } |
app/src/main/java/com/shunzhi/parent/contract/consult/consultone/ConsultOneContract.java
@@ -7,6 +7,8 @@ import com.share.mvpsdk.base.BasePresenter; | @@ -7,6 +7,8 @@ import com.share.mvpsdk.base.BasePresenter; | ||
7 | import com.share.mvpsdk.base.IBaseFragment; | 7 | import com.share.mvpsdk.base.IBaseFragment; |
8 | import com.share.mvpsdk.base.IBaseModel; | 8 | import com.share.mvpsdk.base.IBaseModel; |
9 | import com.shunzhi.parent.bean.GuangGaoBean; | 9 | import com.shunzhi.parent.bean.GuangGaoBean; |
10 | +import com.shunzhi.parent.bean.channel.ChannelBean; | ||
11 | +import com.shunzhi.parent.bean.channel.ChannelContextBean; | ||
10 | 12 | ||
11 | import java.util.List; | 13 | import java.util.List; |
12 | 14 | ||
@@ -39,7 +41,9 @@ public interface ConsultOneContract { | @@ -39,7 +41,9 @@ public interface ConsultOneContract { | ||
39 | 41 | ||
40 | void showBanners(List<GuangGaoBean> guangGaoBeanList); | 42 | void showBanners(List<GuangGaoBean> guangGaoBeanList); |
41 | 43 | ||
42 | - void showConsultContent(); | 44 | + void showConsultContent(List<ChannelContextBean> list); |
45 | + | ||
46 | + void showChannel(List<ChannelBean> list); | ||
43 | 47 | ||
44 | 48 | ||
45 | } | 49 | } |
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
@@ -6,8 +6,6 @@ import com.share.mvpsdk.helper.RetrofitCreateHelper; | @@ -6,8 +6,6 @@ import com.share.mvpsdk.helper.RetrofitCreateHelper; | ||
6 | import com.share.mvpsdk.helper.RxHelper; | 6 | import com.share.mvpsdk.helper.RxHelper; |
7 | import com.shunzhi.parent.AppConfig; | 7 | import com.shunzhi.parent.AppConfig; |
8 | import com.shunzhi.parent.api.Consult; | 8 | import com.shunzhi.parent.api.Consult; |
9 | -import com.shunzhi.parent.api.LoginRegisterApi; | ||
10 | -import com.shunzhi.parent.bean.UserInfo; | ||
11 | import com.shunzhi.parent.contract.consult.ConsultContract; | 9 | import com.shunzhi.parent.contract.consult.ConsultContract; |
12 | 10 | ||
13 | import io.reactivex.Observable; | 11 | import io.reactivex.Observable; |
@@ -32,8 +30,6 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM | @@ -32,8 +30,6 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM | ||
32 | 30 | ||
33 | @Override | 31 | @Override |
34 | public Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex) { | 32 | public Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex) { |
35 | -// return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) | ||
36 | -// .getConsultContent(areaName,channel,toFirstPage,pageIndex); | ||
37 | return RetrofitCreateHelper.getInstance().createApi(Consult.class,AppConfig.BASE_URL).getConsultContent(areaName,channel,toFirstPage,pageIndex) | 33 | return RetrofitCreateHelper.getInstance().createApi(Consult.class,AppConfig.BASE_URL).getConsultContent(areaName,channel,toFirstPage,pageIndex) |
38 | .compose(RxHelper.<JsonObject>rxSchedulerHelper()); | 34 | .compose(RxHelper.<JsonObject>rxSchedulerHelper()); |
39 | } | 35 | } |
app/src/main/java/com/shunzhi/parent/model/consult/consultone/ConsultOneModel.java
@@ -6,7 +6,6 @@ import com.share.mvpsdk.helper.RetrofitCreateHelper; | @@ -6,7 +6,6 @@ import com.share.mvpsdk.helper.RetrofitCreateHelper; | ||
6 | import com.share.mvpsdk.helper.RxHelper; | 6 | import com.share.mvpsdk.helper.RxHelper; |
7 | import com.shunzhi.parent.AppConfig; | 7 | import com.shunzhi.parent.AppConfig; |
8 | import com.shunzhi.parent.api.Consult; | 8 | import com.shunzhi.parent.api.Consult; |
9 | -import com.shunzhi.parent.bean.GuangGaoBean; | ||
10 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; | 9 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; |
11 | 10 | ||
12 | import io.reactivex.Observable; | 11 | import io.reactivex.Observable; |
@@ -35,6 +34,9 @@ public class ConsultOneModel extends BaseModel implements ConsultOneContract.ICo | @@ -35,6 +34,9 @@ public class ConsultOneModel extends BaseModel implements ConsultOneContract.ICo | ||
35 | @Override | 34 | @Override |
36 | public Observable<JsonObject> getConsultContent(String areaName, int channel, int toFirstPage, int pageIndex) { | 35 | public Observable<JsonObject> getConsultContent(String areaName, int channel, int toFirstPage, int pageIndex) { |
37 | return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) | 36 | return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) |
38 | - .getConsultContent(areaName,channel,toFirstPage,pageIndex); | 37 | + .getConsultContent(areaName,channel,toFirstPage,pageIndex).compose(RxHelper.<JsonObject>rxSchedulerHelper()); |
39 | } | 38 | } |
39 | + | ||
40 | + | ||
41 | + | ||
40 | } | 42 | } |
app/src/main/java/com/shunzhi/parent/presenter/consult/consultone/ConsultOnePresenter.java
1 | package com.shunzhi.parent.presenter.consult.consultone; | 1 | package com.shunzhi.parent.presenter.consult.consultone; |
2 | 2 | ||
3 | +import android.util.Log; | ||
3 | import android.view.View; | 4 | import android.view.View; |
4 | import android.widget.LinearLayout; | 5 | import android.widget.LinearLayout; |
5 | 6 | ||
6 | import com.google.gson.Gson; | 7 | import com.google.gson.Gson; |
7 | import com.google.gson.JsonArray; | 8 | import com.google.gson.JsonArray; |
8 | import com.google.gson.JsonObject; | 9 | import com.google.gson.JsonObject; |
10 | +import com.share.mvpsdk.utils.OkHttpExceptionUtil; | ||
9 | import com.share.mvpsdk.utils.ToastUtils; | 11 | import com.share.mvpsdk.utils.ToastUtils; |
10 | import com.shunzhi.parent.R; | 12 | import com.shunzhi.parent.R; |
11 | import com.shunzhi.parent.bean.GuangGaoBean; | 13 | import com.shunzhi.parent.bean.GuangGaoBean; |
12 | import com.shunzhi.parent.bean.ToolBean; | 14 | import com.shunzhi.parent.bean.ToolBean; |
15 | +import com.shunzhi.parent.bean.channel.ChannelBean; | ||
16 | +import com.shunzhi.parent.bean.channel.ChannelContextBean; | ||
17 | +import com.shunzhi.parent.bean.channel.ChannelInfo; | ||
13 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; | 18 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; |
14 | import com.shunzhi.parent.model.consult.consultone.ConsultOneModel; | 19 | import com.shunzhi.parent.model.consult.consultone.ConsultOneModel; |
15 | import com.shunzhi.parent.ui.activity.consult.ConsultTwoLevelActivity; | 20 | import com.shunzhi.parent.ui.activity.consult.ConsultTwoLevelActivity; |
@@ -20,6 +25,7 @@ import java.util.ArrayList; | @@ -20,6 +25,7 @@ import java.util.ArrayList; | ||
20 | import java.util.List; | 25 | import java.util.List; |
21 | 26 | ||
22 | import io.reactivex.functions.Consumer; | 27 | import io.reactivex.functions.Consumer; |
28 | +import retrofit2.HttpException; | ||
23 | 29 | ||
24 | /** | 30 | /** |
25 | * Created by ToaHanDong on 2018/3/14. | 31 | * Created by ToaHanDong on 2018/3/14. |
@@ -80,6 +86,26 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ | @@ -80,6 +86,26 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ | ||
80 | 86 | ||
81 | @Override | 87 | @Override |
82 | public void getConsultContent(String areaName, int channel, int toFirstPage, int pageIndex) { | 88 | public void getConsultContent(String areaName, int channel, int toFirstPage, int pageIndex) { |
89 | + mRxManager.register(mIModel.getConsultContent(areaName, channel, toFirstPage, pageIndex).subscribe(new Consumer<JsonObject>() { | ||
90 | + @Override | ||
91 | + public void accept(JsonObject jsonObject) throws Exception { | ||
92 | + ToastUtils.showToast(jsonObject.toString()); | ||
93 | + JsonObject json=jsonObject.getAsJsonObject("data"); | ||
94 | + Gson g=new Gson(); | ||
95 | + ChannelInfo channelInfo = g.fromJson(json.toString(),ChannelInfo.class); | ||
96 | + Log.e("ssss-===",channelInfo.toString()); | ||
97 | + List<ChannelContextBean> contextList = channelInfo.getChannelContent(); | ||
98 | + List<ChannelBean> channelList = channelInfo.getSubchannel(); | ||
99 | + mIView.showChannel(channelList); | ||
100 | + mIView.showConsultContent(contextList); | ||
101 | + } | ||
102 | + }, new Consumer<Throwable>() { | ||
103 | + @Override | ||
104 | + public void accept(Throwable throwable) throws Exception { | ||
105 | + OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); | ||
106 | + } | ||
107 | + })); | ||
108 | + | ||
83 | 109 | ||
84 | } | 110 | } |
85 | 111 |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
@@ -143,9 +143,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -143,9 +143,15 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
143 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(currentBean.getSex())); | 143 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_SEX, String.valueOf(currentBean.getSex())); |
144 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.PARENT_ID, String.valueOf(currentBean.getParentId())); | 144 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.PARENT_ID, String.valueOf(currentBean.getParentId())); |
145 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); | 145 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); |
146 | + | ||
147 | + if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { | ||
148 | + AppConfig.ISBINDING = true; | ||
149 | + } | ||
150 | + | ||
146 | String account = currentBean.getUserid(); | 151 | String account = currentBean.getUserid(); |
147 | String token = Utils.MD5(account); | 152 | String token = Utils.MD5(account); |
148 | nimLogin(account, token); | 153 | nimLogin(account, token); |
154 | + | ||
149 | mIView.getUserInfo(0); | 155 | mIView.getUserInfo(0); |
150 | 156 | ||
151 | } else { | 157 | } else { |
app/src/main/java/com/shunzhi/parent/ui/activity/ChildDetialActivity.java
@@ -3,6 +3,7 @@ package com.shunzhi.parent.ui.activity; | @@ -3,6 +3,7 @@ package com.shunzhi.parent.ui.activity; | ||
3 | import android.os.Bundle; | 3 | import android.os.Bundle; |
4 | import android.text.TextUtils; | 4 | import android.text.TextUtils; |
5 | import android.view.View; | 5 | import android.view.View; |
6 | +import android.widget.ImageView; | ||
6 | import android.widget.TextView; | 7 | import android.widget.TextView; |
7 | 8 | ||
8 | import com.google.gson.Gson; | 9 | import com.google.gson.Gson; |
@@ -15,7 +16,8 @@ import com.shunzhi.parent.bean.ChildBean; | @@ -15,7 +16,8 @@ import com.shunzhi.parent.bean.ChildBean; | ||
15 | */ | 16 | */ |
16 | 17 | ||
17 | public class ChildDetialActivity extends BaseCompatActivity { | 18 | public class ChildDetialActivity extends BaseCompatActivity { |
18 | - TextView child_name, child_school, child_class, school_area, student_code,center_title,back; | 19 | + TextView child_name, child_school, child_class, school_area, student_code,center_title; |
20 | + ImageView back; | ||
19 | 21 | ||
20 | @Override | 22 | @Override |
21 | protected void initView(Bundle savedInstanceState) { | 23 | protected void initView(Bundle savedInstanceState) { |
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
@@ -11,6 +11,7 @@ import android.view.LayoutInflater; | @@ -11,6 +11,7 @@ import android.view.LayoutInflater; | ||
11 | import android.view.View; | 11 | import android.view.View; |
12 | import android.view.ViewGroup; | 12 | import android.view.ViewGroup; |
13 | import android.view.WindowManager; | 13 | import android.view.WindowManager; |
14 | +import android.widget.ImageView; | ||
14 | import android.widget.PopupWindow; | 15 | import android.widget.PopupWindow; |
15 | import android.widget.TextView; | 16 | import android.widget.TextView; |
16 | 17 | ||
@@ -26,6 +27,7 @@ import com.shunzhi.parent.bean.CurrentBean; | @@ -26,6 +27,7 @@ import com.shunzhi.parent.bean.CurrentBean; | ||
26 | import com.shunzhi.parent.contract.mine.MyChildContract; | 27 | import com.shunzhi.parent.contract.mine.MyChildContract; |
27 | import com.shunzhi.parent.presenter.mine.MyChildPresenter; | 28 | import com.shunzhi.parent.presenter.mine.MyChildPresenter; |
28 | import com.shunzhi.parent.ui.activity.binding.SelectSchoolActivity; | 29 | import com.shunzhi.parent.ui.activity.binding.SelectSchoolActivity; |
30 | +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; | ||
29 | import com.yanzhenjie.recyclerview.swipe.SwipeMenu; | 31 | import com.yanzhenjie.recyclerview.swipe.SwipeMenu; |
30 | import com.yanzhenjie.recyclerview.swipe.SwipeMenuBridge; | 32 | import com.yanzhenjie.recyclerview.swipe.SwipeMenuBridge; |
31 | import com.yanzhenjie.recyclerview.swipe.SwipeMenuCreator; | 33 | import com.yanzhenjie.recyclerview.swipe.SwipeMenuCreator; |
@@ -43,7 +45,8 @@ import java.util.List; | @@ -43,7 +45,8 @@ import java.util.List; | ||
43 | public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel> | 45 | public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel> |
44 | implements MyChildContract.IMyChildView, View.OnClickListener { | 46 | implements MyChildContract.IMyChildView, View.OnClickListener { |
45 | SwipeMenuRecyclerView child_recycle; | 47 | SwipeMenuRecyclerView child_recycle; |
46 | - TextView back, center_title, add_child; | 48 | + TextView center_title, add_child, go_buy; |
49 | + ImageView back; | ||
47 | ChildAdapter childAdapter; | 50 | ChildAdapter childAdapter; |
48 | List<ChildBean> currlist = new ArrayList<>(); | 51 | List<ChildBean> currlist = new ArrayList<>(); |
49 | 52 | ||
@@ -59,6 +62,7 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | @@ -59,6 +62,7 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | ||
59 | add_child = findViewById(R.id.add_child); | 62 | add_child = findViewById(R.id.add_child); |
60 | child_recycle = findViewById(R.id.child_recycle); | 63 | child_recycle = findViewById(R.id.child_recycle); |
61 | back = findViewById(R.id.back_top); | 64 | back = findViewById(R.id.back_top); |
65 | + | ||
62 | center_title = findViewById(R.id.center_title); | 66 | center_title = findViewById(R.id.center_title); |
63 | center_title.setText("我的孩子"); | 67 | center_title.setText("我的孩子"); |
64 | add_child.setOnClickListener(this); | 68 | add_child.setOnClickListener(this); |
@@ -119,6 +123,12 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | @@ -119,6 +123,12 @@ public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChi | ||
119 | finish(); | 123 | finish(); |
120 | } else if (v == add_child) { | 124 | } else if (v == add_child) { |
121 | startActivity(new Intent().setClass(MyChildActivity.this, SelectSchoolActivity.class)); | 125 | startActivity(new Intent().setClass(MyChildActivity.this, SelectSchoolActivity.class)); |
126 | + } else if (v == go_buy) { | ||
127 | + Bundle bundle = new Bundle(); | ||
128 | + bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | ||
129 | + AppConfig.getAppConfig(this).get(AppConfig.USER_ID)); | ||
130 | + bundle.putInt("type",AppConfig.ORDER_CENTER); | ||
131 | + startNewActivity(WebViewActivity.class, bundle); | ||
122 | } | 132 | } |
123 | } | 133 | } |
124 | 134 |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
@@ -9,6 +9,7 @@ import android.view.LayoutInflater; | @@ -9,6 +9,7 @@ import android.view.LayoutInflater; | ||
9 | import android.view.View; | 9 | import android.view.View; |
10 | import android.view.ViewGroup; | 10 | import android.view.ViewGroup; |
11 | import android.view.WindowManager; | 11 | import android.view.WindowManager; |
12 | +import android.widget.ImageView; | ||
12 | import android.widget.LinearLayout; | 13 | import android.widget.LinearLayout; |
13 | import android.widget.PopupWindow; | 14 | import android.widget.PopupWindow; |
14 | import android.widget.TextView; | 15 | import android.widget.TextView; |
@@ -38,8 +39,9 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | @@ -38,8 +39,9 @@ public class CheckInfoActivity extends BaseMVPCompatActivity<MyChildContract.MyC | ||
38 | int school_id = 0, isNew, classId, studentId; | 39 | int school_id = 0, isNew, classId, studentId; |
39 | String captcha = ""; | 40 | String captcha = ""; |
40 | LinearLayout iphone_layout; | 41 | LinearLayout iphone_layout; |
41 | - TextView child_name, child_sex, child_grade, child_class, add_child, user_mobile, back, center_title; | 42 | + TextView child_name, child_sex, child_grade, child_class, add_child, user_mobile, center_title; |
42 | ChildBean childBean; | 43 | ChildBean childBean; |
44 | + ImageView back; | ||
43 | 45 | ||
44 | @NonNull | 46 | @NonNull |
45 | @Override | 47 | @Override |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CreateChildInfoActivity.java
@@ -9,6 +9,7 @@ import android.view.ContextMenu; | @@ -9,6 +9,7 @@ import android.view.ContextMenu; | ||
9 | import android.view.MenuItem; | 9 | import android.view.MenuItem; |
10 | import android.view.View; | 10 | import android.view.View; |
11 | import android.widget.EditText; | 11 | import android.widget.EditText; |
12 | +import android.widget.ImageView; | ||
12 | import android.widget.TextView; | 13 | import android.widget.TextView; |
13 | 14 | ||
14 | import com.share.mvpsdk.base.BasePresenter; | 15 | import com.share.mvpsdk.base.BasePresenter; |
@@ -35,8 +36,9 @@ public class CreateChildInfoActivity extends BaseMVPCompatActivity<MyChildContra | @@ -35,8 +36,9 @@ public class CreateChildInfoActivity extends BaseMVPCompatActivity<MyChildContra | ||
35 | implements MyChildContract.IMyChildView, View.OnClickListener { | 36 | implements MyChildContract.IMyChildView, View.OnClickListener { |
36 | 37 | ||
37 | int type, school_id, sexId, gradeId, classId; | 38 | int type, school_id, sexId, gradeId, classId; |
38 | - TextView select_sex, select_grade, select_class, add_child, center_title, back; | 39 | + TextView select_sex, select_grade, select_class, add_child, center_title; |
39 | EditText child_name; | 40 | EditText child_name; |
41 | + ImageView back; | ||
40 | Map<String, Integer> currMap = new ArrayMap<>(); | 42 | Map<String, Integer> currMap = new ArrayMap<>(); |
41 | List<ChildClass> gradeList = new ArrayList<>(); | 43 | List<ChildClass> gradeList = new ArrayList<>(); |
42 | List<ChildClass> classList = new ArrayList<>(); | 44 | List<ChildClass> classList = new ArrayList<>(); |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/InviteCodeActivity.java
@@ -6,6 +6,7 @@ import android.support.annotation.NonNull; | @@ -6,6 +6,7 @@ import android.support.annotation.NonNull; | ||
6 | import android.text.TextUtils; | 6 | import android.text.TextUtils; |
7 | import android.view.View; | 7 | import android.view.View; |
8 | import android.widget.EditText; | 8 | import android.widget.EditText; |
9 | +import android.widget.ImageView; | ||
9 | import android.widget.TextView; | 10 | import android.widget.TextView; |
10 | 11 | ||
11 | import com.share.mvpsdk.base.BasePresenter; | 12 | import com.share.mvpsdk.base.BasePresenter; |
@@ -19,9 +20,10 @@ import com.shunzhi.parent.presenter.mine.MyChildPresenter; | @@ -19,9 +20,10 @@ import com.shunzhi.parent.presenter.mine.MyChildPresenter; | ||
19 | */ | 20 | */ |
20 | 21 | ||
21 | public class InviteCodeActivity extends BaseMVPCompatActivity { | 22 | public class InviteCodeActivity extends BaseMVPCompatActivity { |
22 | - TextView add_child,center_title,back; | 23 | + TextView add_child,center_title; |
23 | EditText et_invite_code; | 24 | EditText et_invite_code; |
24 | int school_id; | 25 | int school_id; |
26 | + ImageView back; | ||
25 | 27 | ||
26 | @NonNull | 28 | @NonNull |
27 | @Override | 29 | @Override |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
@@ -6,6 +6,7 @@ import android.support.annotation.NonNull; | @@ -6,6 +6,7 @@ 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.view.View; | 8 | import android.view.View; |
9 | +import android.widget.ImageView; | ||
9 | import android.widget.TextView; | 10 | import android.widget.TextView; |
10 | 11 | ||
11 | import com.share.mvpsdk.base.BasePresenter; | 12 | import com.share.mvpsdk.base.BasePresenter; |
@@ -39,7 +40,8 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -39,7 +40,8 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
39 | View.OnClickListener, SchoolListContract.ISchoolListView, CityPickerListener { | 40 | View.OnClickListener, SchoolListContract.ISchoolListView, CityPickerListener { |
40 | 41 | ||
41 | private SideBar sideBar; | 42 | private SideBar sideBar; |
42 | - private TextView dialog, go_next, tvLocalAddress, center_title, back; | 43 | + private TextView dialog, go_next, tvLocalAddress, center_title; |
44 | + ImageView back; | ||
43 | private RecyclerView schoollist; | 45 | private RecyclerView schoollist; |
44 | private List<String> list = new ArrayList<>(); | 46 | private List<String> list = new ArrayList<>(); |
45 | SchoolListAdapter schoolListAdapter; | 47 | SchoolListAdapter schoolListAdapter; |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -3,16 +3,14 @@ package com.shunzhi.parent.ui.activity.mywebview; | @@ -3,16 +3,14 @@ package com.shunzhi.parent.ui.activity.mywebview; | ||
3 | import android.content.Context; | 3 | import android.content.Context; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.graphics.Bitmap; | 5 | import android.graphics.Bitmap; |
6 | -import android.os.Build; | ||
7 | import android.os.Bundle; | 6 | import android.os.Bundle; |
8 | -import android.support.v7.app.AppCompatActivity; | ||
9 | -import android.util.Log; | ||
10 | import android.view.View; | 7 | import android.view.View; |
11 | import android.webkit.JavascriptInterface; | 8 | import android.webkit.JavascriptInterface; |
12 | import android.webkit.WebChromeClient; | 9 | import android.webkit.WebChromeClient; |
13 | import android.webkit.WebSettings; | 10 | import android.webkit.WebSettings; |
14 | import android.webkit.WebView; | 11 | import android.webkit.WebView; |
15 | import android.webkit.WebViewClient; | 12 | import android.webkit.WebViewClient; |
13 | +import android.widget.ImageView; | ||
16 | import android.widget.LinearLayout; | 14 | import android.widget.LinearLayout; |
17 | import android.widget.ProgressBar; | 15 | import android.widget.ProgressBar; |
18 | import android.widget.TextView; | 16 | import android.widget.TextView; |
@@ -28,7 +26,9 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -28,7 +26,9 @@ public class WebViewActivity extends BaseCompatActivity { | ||
28 | 26 | ||
29 | NestedScrollWebView nesteScrollWebView; | 27 | NestedScrollWebView nesteScrollWebView; |
30 | LinearLayout binding_success, binding_success2; | 28 | LinearLayout binding_success, binding_success2; |
31 | - TextView close,tv_info,zuoye,title_web; | 29 | + ImageView close; |
30 | + TextView tv_info,zuoye,title_web; | ||
31 | + | ||
32 | int type; | 32 | int type; |
33 | 33 | ||
34 | private ProgressBar pvWeb; | 34 | private ProgressBar pvWeb; |
@@ -42,14 +42,30 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -42,14 +42,30 @@ public class WebViewActivity extends BaseCompatActivity { | ||
42 | 42 | ||
43 | @Override | 43 | @Override |
44 | protected void initView(Bundle savedInstanceState) { | 44 | protected void initView(Bundle savedInstanceState) { |
45 | + | ||
46 | + binding_success=findViewById(R.id.binding_success); | ||
47 | + | ||
45 | binding_success=findViewById(R.id.binding_success1); | 48 | binding_success=findViewById(R.id.binding_success1); |
49 | + | ||
46 | binding_success2=findViewById(R.id.binding_success2); | 50 | binding_success2=findViewById(R.id.binding_success2); |
47 | close = findViewById(R.id.close_btn); | 51 | close = findViewById(R.id.close_btn); |
48 | tv_info = findViewById(R.id.tv_info); | 52 | tv_info = findViewById(R.id.tv_info); |
49 | zuoye = findViewById(R.id.zuoye); | 53 | zuoye = findViewById(R.id.zuoye); |
50 | title_web = findViewById(R.id.title_web); | 54 | title_web = findViewById(R.id.title_web); |
51 | 55 | ||
56 | + | ||
57 | + close.setOnClickListener(new View.OnClickListener() { | ||
58 | + @Override | ||
59 | + public void onClick(View v) { | ||
60 | + onBackPressedSupport(); | ||
61 | + } | ||
62 | + }); | ||
63 | + | ||
64 | + | ||
65 | + nesteScrollWebView = findViewById(R.id.nesteScrollWebView); | ||
66 | + | ||
52 | nesteScrollWebView = findViewById(R.id.webView); | 67 | nesteScrollWebView = findViewById(R.id.webView); |
68 | + | ||
53 | pvWeb = findViewById(R.id.pb_web); | 69 | pvWeb = findViewById(R.id.pb_web); |
54 | type = getIntent().getIntExtra("type", 0); | 70 | type = getIntent().getIntExtra("type", 0); |
55 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | 71 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { |
@@ -66,10 +82,12 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -66,10 +82,12 @@ public class WebViewActivity extends BaseCompatActivity { | ||
66 | binding_success.setVisibility(View.GONE); | 82 | binding_success.setVisibility(View.GONE); |
67 | binding_success2.setVisibility(View.GONE); | 83 | binding_success2.setVisibility(View.GONE); |
68 | title_web.setVisibility(View.VISIBLE); | 84 | title_web.setVisibility(View.VISIBLE); |
85 | + | ||
69 | }else { | 86 | }else { |
70 | binding_success.setVisibility(View.GONE); | 87 | binding_success.setVisibility(View.GONE); |
71 | binding_success2.setVisibility(View.GONE); | 88 | binding_success2.setVisibility(View.GONE); |
72 | title_web.setVisibility(View.GONE); | 89 | title_web.setVisibility(View.GONE); |
90 | + | ||
73 | } | 91 | } |
74 | 92 | ||
75 | initWebView(); | 93 | initWebView(); |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -30,7 +30,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -30,7 +30,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
30 | implements MineContract.IMineView, View.OnClickListener { | 30 | implements MineContract.IMineView, View.OnClickListener { |
31 | LinearLayout childlayout, personinfo, layout_orderDetail, layout_order; | 31 | LinearLayout childlayout, personinfo, layout_orderDetail, layout_order; |
32 | RoundedImageView user_photo; | 32 | RoundedImageView user_photo; |
33 | - TextView user_name, user_mobile, tvExit; | 33 | + TextView user_name, user_mobile, tvExit,binding_state; |
34 | 34 | ||
35 | @NonNull | 35 | @NonNull |
36 | @Override | 36 | @Override |
@@ -58,6 +58,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -58,6 +58,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
58 | user_mobile = view.findViewById(R.id.user_mobile); | 58 | user_mobile = view.findViewById(R.id.user_mobile); |
59 | tvExit = view.findViewById(R.id.tvExit); | 59 | tvExit = view.findViewById(R.id.tvExit); |
60 | tvExit.setOnClickListener(this); | 60 | tvExit.setOnClickListener(this); |
61 | + binding_state=view.findViewById(R.id.binding_state); | ||
62 | + if(AppConfig.ISBINDING){ | ||
63 | + binding_state.setText(""); | ||
64 | + } | ||
61 | 65 | ||
62 | } | 66 | } |
63 | 67 |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
@@ -25,10 +25,14 @@ import com.shunzhi.parent.R; | @@ -25,10 +25,14 @@ import com.shunzhi.parent.R; | ||
25 | import com.shunzhi.parent.adapter.MyConsultAdapter; | 25 | import com.shunzhi.parent.adapter.MyConsultAdapter; |
26 | import com.shunzhi.parent.bean.GuangGaoBean; | 26 | import com.shunzhi.parent.bean.GuangGaoBean; |
27 | import com.shunzhi.parent.bean.MyConsultBean; | 27 | import com.shunzhi.parent.bean.MyConsultBean; |
28 | +import com.shunzhi.parent.bean.channel.ChannelBean; | ||
29 | +import com.shunzhi.parent.bean.channel.ChannelContextBean; | ||
28 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; | 30 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; |
29 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; | 31 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; |
32 | +import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity; | ||
33 | +import com.shunzhi.parent.util.AttrsUtils; | ||
34 | +import com.shunzhi.parent.views.TextAndImgShowView; | ||
30 | 35 | ||
31 | -import java.util.ArrayList; | ||
32 | import java.util.List; | 36 | import java.util.List; |
33 | 37 | ||
34 | public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneContract.ConsultOnePresenter, | 38 | public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneContract.ConsultOnePresenter, |
@@ -77,30 +81,31 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -77,30 +81,31 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
77 | 81 | ||
78 | layout_control = view.findViewById(R.id.layout_control); | 82 | layout_control = view.findViewById(R.id.layout_control); |
79 | layout_control.measure(0, 0); | 83 | layout_control.measure(0, 0); |
80 | - mPresenter.getTools(layout_control); | 84 | +// mPresenter.getTools(layout_control); |
81 | recyclerViewGrally = view.findViewById(R.id.recyclerViewGrally); | 85 | recyclerViewGrally = view.findViewById(R.id.recyclerViewGrally); |
82 | recyclerViewConsultOne = view.findViewById(R.id.recyclerViewConsultOne); | 86 | recyclerViewConsultOne = view.findViewById(R.id.recyclerViewConsultOne); |
83 | 87 | ||
84 | - mPresenter.getBanners("3","杭州"); | ||
85 | - initRecyclerViewConsult(); | 88 | + mPresenter.getBanners("3","余杭"); |
89 | + mPresenter.getConsultContent("余杭区", 42, 0, 1); | ||
90 | +// initRecyclerViewConsult(); | ||
86 | } | 91 | } |
87 | 92 | ||
88 | - private void initRecyclerViewConsult() { | ||
89 | - if (null == myConsultAdapter) myConsultAdapter = new MyConsultAdapter(getActivity()); | ||
90 | - if (null == myConsultBeanList) myConsultBeanList = new ArrayList<>(); | ||
91 | - else myConsultBeanList.clear(); | ||
92 | - for (int i = 0; i < 12; i++) { | ||
93 | - MyConsultBean myConsultBean = new MyConsultBean(); | ||
94 | - myConsultBean.consultCounts = i + ""; | ||
95 | - myConsultBean.consultContent = "咨询内容" + i; | ||
96 | - myConsultBean.consultTitle = "咨询标题" + i; | ||
97 | - myConsultBean.consultZhuanfaCounts = "转发:" + i; | ||
98 | - myConsultBeanList.add(myConsultBean); | ||
99 | - } | ||
100 | - myConsultAdapter.addAll(myConsultBeanList); | ||
101 | - recyclerViewConsultOne.setAdapter(myConsultAdapter); | ||
102 | - | ||
103 | - } | 93 | +// private void initRecyclerViewConsult() { |
94 | +// if (null == myConsultAdapter) myConsultAdapter = new MyConsultAdapter(getActivity()); | ||
95 | +// if (null == myConsultBeanList) myConsultBeanList = new ArrayList<>(); | ||
96 | +// else myConsultBeanList.clear(); | ||
97 | +// for (int i = 0; i < 12; i++) { | ||
98 | +// MyConsultBean myConsultBean = new MyConsultBean(); | ||
99 | +// myConsultBean.consultCounts = i + ""; | ||
100 | +// myConsultBean.consultContent = "咨询内容" + i; | ||
101 | +// myConsultBean.consultTitle = "咨询标题" + i; | ||
102 | +// myConsultBean.consultZhuanfaCounts = "转发:" + i; | ||
103 | +// myConsultBeanList.add(myConsultBean); | ||
104 | +// } | ||
105 | +// myConsultAdapter.addAll(myConsultBeanList); | ||
106 | +// recyclerViewConsultOne.setAdapter(myConsultAdapter); | ||
107 | +// | ||
108 | +// } | ||
104 | 109 | ||
105 | @NonNull | 110 | @NonNull |
106 | @Override | 111 | @Override |
@@ -126,7 +131,33 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -126,7 +131,33 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
126 | } | 131 | } |
127 | 132 | ||
128 | @Override | 133 | @Override |
129 | - public void showConsultContent() { | 134 | + public void showConsultContent(List<ChannelContextBean> list) { |
135 | +// contextList.clear(); | ||
136 | +// contextList.addAll(list); | ||
137 | + if (null == myConsultAdapter) myConsultAdapter = new MyConsultAdapter(getActivity()); | ||
138 | + myConsultAdapter.addAll(list); | ||
139 | + recyclerViewConsultOne.setAdapter(myConsultAdapter); | ||
140 | + } | ||
141 | + | ||
142 | + @Override | ||
143 | + public void showChannel(List<ChannelBean> list) { | ||
144 | + for (int i = 0; i < list.size(); i++) { | ||
145 | + TextAndImgShowView textAndImgShowView = new TextAndImgShowView(getActivity()); | ||
146 | + textAndImgShowView.setTextColor(R.color.textColor); | ||
147 | + textAndImgShowView.setText(list.get(i).getChannelName()); | ||
148 | +// textAndImgShowView.setImgs(R.drawable.play, Integer.parseInt(list.get(i).getChannelImage())); | ||
149 | + textAndImgShowView.addImgs(list.get(i).getChannelImage()); | ||
150 | + textAndImgShowView.setSelect(true); | ||
151 | + textAndImgShowView.setWidth(getActivity(), layout_control); | ||
152 | + textAndImgShowView.setBackground(AttrsUtils.getAttrs(getActivity()).getDrawable(0)); | ||
153 | + textAndImgShowView.setOnClickListener(new View.OnClickListener() { | ||
154 | + @Override | ||
155 | + public void onClick(View view) { | ||
156 | + ConsultOneLevelActivity.getInstance(getActivity()); | ||
157 | + } | ||
158 | + }); | ||
159 | + layout_control.addView(textAndImgShowView); | ||
160 | + } | ||
130 | } | 161 | } |
131 | 162 | ||
132 | private class MyGrallyAdapter extends BaseRecyclerViewAdapter<GuangGaoBean> { | 163 | private class MyGrallyAdapter extends BaseRecyclerViewAdapter<GuangGaoBean> { |
@@ -164,7 +195,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -164,7 +195,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
164 | @Override | 195 | @Override |
165 | public void onBindViewHolder(GuangGaoBean object, int position) { | 196 | public void onBindViewHolder(GuangGaoBean object, int position) { |
166 | Glide.with(getActivity()).load(AppConfig.BASE_URL_IMG+object.fileSrc).error(R.drawable.ic_launcher_foreground).into(iv_grally); | 197 | Glide.with(getActivity()).load(AppConfig.BASE_URL_IMG+object.fileSrc).error(R.drawable.ic_launcher_foreground).into(iv_grally); |
167 | -// iv_grally.setImageResource(R.drawable.ic_launcher_background); | ||
168 | tv_grally_title.setText(object.describe+""); | 198 | tv_grally_title.setText(object.describe+""); |
169 | } | 199 | } |
170 | } | 200 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultTwoLevelFragment.java
1 | package com.shunzhi.parent.ui.fragment.consult; | 1 | package com.shunzhi.parent.ui.fragment.consult; |
2 | 2 | ||
3 | -import android.content.Context; | ||
4 | -import android.net.Uri; | ||
5 | import android.os.Bundle; | 3 | import android.os.Bundle; |
6 | import android.support.annotation.NonNull; | 4 | import android.support.annotation.NonNull; |
7 | import android.support.annotation.Nullable; | 5 | import android.support.annotation.Nullable; |
8 | -import android.support.v4.app.Fragment; | ||
9 | import android.support.v7.widget.RecyclerView; | 6 | import android.support.v7.widget.RecyclerView; |
10 | -import android.view.LayoutInflater; | ||
11 | import android.view.View; | 7 | import android.view.View; |
12 | -import android.view.ViewGroup; | ||
13 | import android.widget.TextView; | 8 | import android.widget.TextView; |
14 | 9 | ||
15 | import com.share.mvpsdk.base.BasePresenter; | 10 | import com.share.mvpsdk.base.BasePresenter; |
@@ -18,6 +13,8 @@ import com.shunzhi.parent.R; | @@ -18,6 +13,8 @@ import com.shunzhi.parent.R; | ||
18 | import com.shunzhi.parent.adapter.MyConsultAdapter; | 13 | import com.shunzhi.parent.adapter.MyConsultAdapter; |
19 | import com.shunzhi.parent.bean.GuangGaoBean; | 14 | import com.shunzhi.parent.bean.GuangGaoBean; |
20 | import com.shunzhi.parent.bean.MyConsultBean; | 15 | import com.shunzhi.parent.bean.MyConsultBean; |
16 | +import com.shunzhi.parent.bean.channel.ChannelBean; | ||
17 | +import com.shunzhi.parent.bean.channel.ChannelContextBean; | ||
21 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; | 18 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; |
22 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; | 19 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; |
23 | 20 | ||
@@ -50,23 +47,23 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -50,23 +47,23 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
50 | 47 | ||
51 | recyclerView = view.findViewById(R.id.recyclerView); | 48 | recyclerView = view.findViewById(R.id.recyclerView); |
52 | 49 | ||
53 | - initRecyclerView(); | 50 | +// initRecyclerView(); |
54 | } | 51 | } |
55 | 52 | ||
56 | - private void initRecyclerView() { | ||
57 | - | ||
58 | - if (null == myConsultAdapter) myConsultAdapter = new MyConsultAdapter(getActivity()); | ||
59 | - for (int i = 0; i < 12; i++) { | ||
60 | - MyConsultBean myConsultBean = new MyConsultBean(); | ||
61 | - myConsultBean.consultCounts = i + ""; | ||
62 | - myConsultBean.consultContent = "咨询内容" + i; | ||
63 | - myConsultBean.consultTitle = "咨询标题" + i; | ||
64 | - myConsultBean.consultZhuanfaCounts = "转发:" + i; | ||
65 | - myConsultBeanList.add(myConsultBean); | ||
66 | - } | ||
67 | - myConsultAdapter.addAll(myConsultBeanList); | ||
68 | - recyclerView.setAdapter(myConsultAdapter); | ||
69 | - } | 53 | +// private void initRecyclerView() { |
54 | +// | ||
55 | +// if (null == myConsultAdapter) myConsultAdapter = new MyConsultAdapter(getActivity()); | ||
56 | +// for (int i = 0; i < 12; i++) { | ||
57 | +// MyConsultBean myConsultBean = new MyConsultBean(); | ||
58 | +// myConsultBean.consultCounts = i + ""; | ||
59 | +// myConsultBean.consultContent = "咨询内容" + i; | ||
60 | +// myConsultBean.consultTitle = "咨询标题" + i; | ||
61 | +// myConsultBean.consultZhuanfaCounts = "转发:" + i; | ||
62 | +// myConsultBeanList.add(myConsultBean); | ||
63 | +// } | ||
64 | +// myConsultAdapter.addAll(myConsultBeanList); | ||
65 | +// recyclerView.setAdapter(myConsultAdapter); | ||
66 | +// } | ||
70 | 67 | ||
71 | @NonNull | 68 | @NonNull |
72 | @Override | 69 | @Override |
@@ -84,11 +81,16 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -84,11 +81,16 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
84 | 81 | ||
85 | } | 82 | } |
86 | 83 | ||
87 | - /** | ||
88 | - * 显示咨询内容 | ||
89 | - */ | ||
90 | @Override | 84 | @Override |
91 | - public void showConsultContent() { | 85 | + public void showConsultContent(List<ChannelContextBean> list) { |
86 | + | ||
87 | + } | ||
88 | + | ||
89 | + @Override | ||
90 | + public void showChannel(List<ChannelBean> list) { | ||
92 | 91 | ||
93 | } | 92 | } |
93 | + | ||
94 | + | ||
95 | + | ||
94 | } | 96 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
@@ -30,9 +30,6 @@ import com.shunzhi.parent.ui.MainActivity; | @@ -30,9 +30,6 @@ import com.shunzhi.parent.ui.MainActivity; | ||
30 | import com.shunzhi.parent.ui.activity.LoginAndRegistActivity; | 30 | import com.shunzhi.parent.ui.activity.LoginAndRegistActivity; |
31 | import com.shunzhi.parent.views.MyProcessDialog; | 31 | import com.shunzhi.parent.views.MyProcessDialog; |
32 | 32 | ||
33 | -import java.util.Calendar; | ||
34 | -import java.util.Date; | ||
35 | - | ||
36 | 33 | ||
37 | public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> | 34 | public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
38 | implements LoginAndRegisterContract.ILoginView, View.OnClickListener { | 35 | implements LoginAndRegisterContract.ILoginView, View.OnClickListener { |
@@ -100,7 +97,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | @@ -100,7 +97,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | ||
100 | phoneNumber.addTextChangedListener(textWatcher); | 97 | phoneNumber.addTextChangedListener(textWatcher); |
101 | idCode.addTextChangedListener(textWatcher); | 98 | idCode.addTextChangedListener(textWatcher); |
102 | password.addTextChangedListener(textWatcher); | 99 | password.addTextChangedListener(textWatcher); |
103 | - mPresenter.loginResult("18358585335", "575335"); | 100 | +// mPresenter.loginResult("18358585335", "575335"); |
104 | 101 | ||
105 | passwordLayout_new = view.findViewById(R.id.passwordLayout_new); | 102 | passwordLayout_new = view.findViewById(R.id.passwordLayout_new); |
106 | et_password_new = view.findViewById(R.id.et_password_new); | 103 | et_password_new = view.findViewById(R.id.et_password_new); |
app/src/main/res/layout/activity_web_view.xml
@@ -7,6 +7,111 @@ | @@ -7,6 +7,111 @@ | ||
7 | android:orientation="vertical" | 7 | android:orientation="vertical" |
8 | android:background="@color/bgColor" | 8 | android:background="@color/bgColor" |
9 | tools:context="com.shunzhi.parent.ui.activity.mywebview.WebViewActivity"> | 9 | tools:context="com.shunzhi.parent.ui.activity.mywebview.WebViewActivity"> |
10 | + | ||
11 | + <RelativeLayout | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:background="@color/back_top" | ||
14 | + android:layout_height="?android:actionBarSize" | ||
15 | + android:orientation="horizontal" | ||
16 | + > | ||
17 | + <ImageView | ||
18 | + android:id="@+id/close_btn" | ||
19 | + android:layout_width="wrap_content" | ||
20 | + android:layout_height="match_parent" | ||
21 | + android:gravity="center" | ||
22 | + android:paddingLeft="@dimen/size_dp_15" | ||
23 | + android:src="@drawable/back" | ||
24 | + android:paddingRight="@dimen/size_dp_15" | ||
25 | + android:textColor="@color/textColor" | ||
26 | + android:textSize="@dimen/textSize16" /> | ||
27 | + <TextView | ||
28 | + android:id="@+id/title_web" | ||
29 | + android:layout_width="wrap_content" | ||
30 | + android:layout_height="wrap_content" | ||
31 | + android:text="订购中心" | ||
32 | + android:textSize="@dimen/txtsize_title" | ||
33 | + android:layout_centerInParent="true" | ||
34 | + android:visibility="gone" | ||
35 | + android:textColor="@color/textColor" | ||
36 | + | ||
37 | + /> | ||
38 | + | ||
39 | + </RelativeLayout> | ||
40 | + | ||
41 | + <LinearLayout | ||
42 | + android:id="@+id/binding_success" | ||
43 | + android:layout_width="match_parent" | ||
44 | + android:layout_height="wrap_content" | ||
45 | + android:gravity="center" | ||
46 | + android:background="@color/white" | ||
47 | + android:layout_marginLeft="20dp" | ||
48 | + android:padding="30dp" | ||
49 | + android:layout_marginRight="20dp" | ||
50 | + | ||
51 | + > | ||
52 | + | ||
53 | + <ImageView | ||
54 | + android:layout_width="40dp" | ||
55 | + android:layout_height="40dp" | ||
56 | + android:background="@drawable/success_big" /> | ||
57 | + | ||
58 | + <TextView | ||
59 | + android:layout_width="wrap_content" | ||
60 | + android:layout_height="match_parent" | ||
61 | + android:layout_marginLeft="20dp" | ||
62 | + android:text="绑定成功" | ||
63 | + android:gravity="center" | ||
64 | + android:textColor="@color/textColor" | ||
65 | + android:textSize="@dimen/txtsize_headline" /> | ||
66 | + | ||
67 | + </LinearLayout> | ||
68 | + <LinearLayout | ||
69 | + android:id="@+id/binding_success2" | ||
70 | + android:visibility="gone" | ||
71 | + android:layout_width="match_parent" | ||
72 | + android:layout_height="wrap_content" | ||
73 | + android:gravity="center" | ||
74 | + android:background="@color/white" | ||
75 | + android:layout_marginLeft="20dp" | ||
76 | + android:padding="30dp" | ||
77 | + android:orientation="vertical" | ||
78 | + android:layout_marginRight="20dp" | ||
79 | + | ||
80 | + > | ||
81 | + <TextView | ||
82 | + android:id="@+id/tv_info" | ||
83 | + android:layout_width="wrap_content" | ||
84 | + android:layout_height="match_parent" | ||
85 | + android:layout_marginLeft="20dp" | ||
86 | + android:text="生成孩子“汇作业”账号为:sz1803081515,初始密码为:sz1803081515(与账号相同)。孩子可以下载“汇作业”app进行使用" | ||
87 | + android:gravity="center" | ||
88 | + android:textColor="@color/textColor" | ||
89 | + android:textSize="@dimen/txtsize_headline" /> | ||
90 | + <LinearLayout | ||
91 | + android:layout_width="match_parent" | ||
92 | + android:layout_height="wrap_content" | ||
93 | + android:layout_marginTop="10dp" | ||
94 | + android:gravity="center" | ||
95 | + > | ||
96 | + <TextView | ||
97 | + android:layout_width="wrap_content" | ||
98 | + android:layout_height="match_parent" | ||
99 | + android:layout_marginLeft="20dp" | ||
100 | + android:text="下载地址:" | ||
101 | + android:textColor="@color/textColor" | ||
102 | + android:textSize="@dimen/txtsize_headline" /> | ||
103 | + <TextView | ||
104 | + android:id="@+id/zuoye" | ||
105 | + android:layout_width="wrap_content" | ||
106 | + android:layout_height="match_parent" | ||
107 | + android:layout_marginLeft="20dp" | ||
108 | + android:text="汇作业" | ||
109 | + android:gravity="center" | ||
110 | + android:textColor="@color/textBlue" | ||
111 | + android:textSize="@dimen/txtsize_headline" /> | ||
112 | + </LinearLayout> | ||
113 | + | ||
114 | + </LinearLayout> | ||
10 | <ProgressBar | 115 | <ProgressBar |
11 | android:id="@+id/pb_web" | 116 | android:id="@+id/pb_web" |
12 | style="?android:attr/progressBarStyleHorizontal" | 117 | style="?android:attr/progressBarStyleHorizontal" |
@@ -17,6 +122,7 @@ | @@ -17,6 +122,7 @@ | ||
17 | <com.share.mvpsdk.widgets.NestedScrollWebView | 122 | <com.share.mvpsdk.widgets.NestedScrollWebView |
18 | android:layout_width="match_parent" | 123 | android:layout_width="match_parent" |
19 | android:layout_height="match_parent" | 124 | android:layout_height="match_parent" |
20 | - android:id="@+id/nesteScrollWebView"/> | 125 | + android:id="@+id/nesteScrollWebView" |
126 | + ></com.share.mvpsdk.widgets.NestedScrollWebView> | ||
21 | 127 | ||
22 | </LinearLayout> | 128 | </LinearLayout> |
app/src/main/res/layout/fragment_mine.xml
@@ -217,6 +217,7 @@ | @@ -217,6 +217,7 @@ | ||
217 | android:textSize="@dimen/txtsize_title" /> | 217 | android:textSize="@dimen/txtsize_title" /> |
218 | 218 | ||
219 | <TextView | 219 | <TextView |
220 | + android:id="@+id/binding_state" | ||
220 | android:layout_width="80dp" | 221 | android:layout_width="80dp" |
221 | android:layout_height="wrap_content" | 222 | android:layout_height="wrap_content" |
222 | android:layout_gravity="center_vertical" | 223 | android:layout_gravity="center_vertical" |
app/src/main/res/layout/fragment_zi_xun.xml
@@ -15,13 +15,16 @@ | @@ -15,13 +15,16 @@ | ||
15 | android:layout_weight="2"></com.stx.xhb.xbanner.XBanner> | 15 | android:layout_weight="2"></com.stx.xhb.xbanner.XBanner> |
16 | 16 | ||
17 | <LinearLayout | 17 | <LinearLayout |
18 | - android:layout_width="wrap_content" | 18 | + android:layout_width="match_parent" |
19 | android:layout_height="wrap_content" | 19 | android:layout_height="wrap_content" |
20 | + android:paddingTop="@dimen/size_dp_10" | ||
20 | android:layout_marginLeft="@dimen/size_dp_10" | 21 | android:layout_marginLeft="@dimen/size_dp_10" |
21 | android:layout_marginRight="@dimen/size_dp_10" | 22 | android:layout_marginRight="@dimen/size_dp_10" |
22 | > | 23 | > |
24 | + | ||
23 | <include layout="@layout/layout_textandimgshow" | 25 | <include layout="@layout/layout_textandimgshow" |
24 | /> | 26 | /> |
27 | + | ||
25 | </LinearLayout> | 28 | </LinearLayout> |
26 | <LinearLayout | 29 | <LinearLayout |
27 | android:layout_width="match_parent" | 30 | android:layout_width="match_parent" |
app/src/main/res/layout/top.xml
@@ -5,12 +5,16 @@ | @@ -5,12 +5,16 @@ | ||
5 | android:background="@color/back_top" | 5 | android:background="@color/back_top" |
6 | android:padding="10dp"> | 6 | android:padding="10dp"> |
7 | 7 | ||
8 | - <TextView | 8 | + <ImageView |
9 | android:id="@+id/back_top" | 9 | android:id="@+id/back_top" |
10 | - android:layout_width="30dp" | ||
11 | - android:layout_height="30dp" | ||
12 | - android:layout_gravity="center_vertical" | ||
13 | - android:background="@drawable/arrow_left" /> | 10 | + android:layout_width="wrap_content" |
11 | + android:layout_height="match_parent" | ||
12 | + android:gravity="center" | ||
13 | + android:paddingLeft="@dimen/size_dp_15" | ||
14 | + android:src="@drawable/back" | ||
15 | + android:paddingRight="@dimen/size_dp_15" | ||
16 | + android:textColor="@color/textColor" | ||
17 | + android:textSize="@dimen/textSize16" /> | ||
14 | 18 | ||
15 | <TextView | 19 | <TextView |
16 | android:id="@+id/center_title" | 20 | android:id="@+id/center_title" |
@@ -19,7 +23,7 @@ | @@ -19,7 +23,7 @@ | ||
19 | android:layout_weight="1" | 23 | android:layout_weight="1" |
20 | android:text="主题" | 24 | android:text="主题" |
21 | android:gravity="center" | 25 | android:gravity="center" |
22 | - android:textColor="@color/textColor" | 26 | + android:textColor="@color/white" |
23 | android:textSize="@dimen/textSize16" /> | 27 | android:textSize="@dimen/textSize16" /> |
24 | <TextView | 28 | <TextView |
25 | android:layout_width="30dp" | 29 | android:layout_width="30dp" |