Commit 03d187a4f3f9d0c90ebe3e62a70c39978f4e1323
Exists in
yxb_dev
and in
2 other branches
Merge branch 'developer' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
6 changed files
with
21 additions
and
13 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/api/Consult.java
| ... | ... | @@ -18,6 +18,9 @@ public interface Consult { |
| 18 | 18 | @GET("api/ParentService/GetAds") |
| 19 | 19 | Observable<JsonObject> getBanners(@Query("position") String position, @Query("areaName") String areaName); |
| 20 | 20 | |
| 21 | + @GET("api/ParentService/GetAds") | |
| 22 | + Observable<JsonObject> getBannerskaiping(@Query("position") String position); | |
| 23 | + | |
| 21 | 24 | |
| 22 | 25 | @FormUrlEncoded |
| 23 | 26 | @POST("api/ParentService/GetChannelInfo") | ... | ... |
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
| 1 | 1 | package com.shunzhi.parent.model.consult; |
| 2 | 2 | |
| 3 | +import android.text.TextUtils; | |
| 4 | + | |
| 3 | 5 | import com.google.gson.JsonObject; |
| 4 | 6 | import com.share.mvpsdk.base.BaseModel; |
| 5 | 7 | import com.share.mvpsdk.helper.RetrofitCreateHelper; |
| ... | ... | @@ -24,8 +26,13 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM |
| 24 | 26 | |
| 25 | 27 | @Override |
| 26 | 28 | public Observable<JsonObject> getBanners(String position,String areaName) { |
| 27 | - return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) | |
| 28 | - .getBanners(position,areaName).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | |
| 29 | + if (TextUtils.isEmpty(areaName)) { | |
| 30 | + return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) | |
| 31 | + .getBannerskaiping(position).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | |
| 32 | + } else { | |
| 33 | + return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL) | |
| 34 | + .getBanners(position, areaName).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | |
| 35 | + } | |
| 29 | 36 | } |
| 30 | 37 | |
| 31 | 38 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| ... | ... | @@ -8,7 +8,6 @@ import android.os.Bundle; |
| 8 | 8 | import android.support.annotation.NonNull; |
| 9 | 9 | import android.support.annotation.Nullable; |
| 10 | 10 | import android.support.v4.widget.NestedScrollView; |
| 11 | -import android.support.v7.widget.LinearLayoutManager; | |
| 12 | 11 | import android.text.TextUtils; |
| 13 | 12 | import android.view.View; |
| 14 | 13 | import android.widget.EditText; |
| ... | ... | @@ -19,7 +18,6 @@ import android.widget.TextView; |
| 19 | 18 | import com.jcodecraeer.xrecyclerview.XRecyclerView; |
| 20 | 19 | import com.share.mvpsdk.base.BasePresenter; |
| 21 | 20 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 22 | -import com.share.mvpsdk.utils.ToastUtils; | |
| 23 | 21 | import com.shunzhi.parent.AppConfig; |
| 24 | 22 | import com.shunzhi.parent.AppContext; |
| 25 | 23 | import com.shunzhi.parent.R; |
| ... | ... | @@ -107,7 +105,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
| 107 | 105 | nesteScrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { |
| 108 | 106 | @Override |
| 109 | 107 | public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { |
| 110 | - ToastUtils.showToast("scrollX="+nesteScrollView.getMeasuredHeight()+"scrollY="+scrollY+"oldScrollX="+oldScrollX+"oldScrollY="+oldScrollY+"layout_consult="+layout_consult.getMeasuredHeight()); | |
| 108 | +// ToastUtils.showToast("scrollX="+nesteScrollView.getMeasuredHeight()+"scrollY="+scrollY+"oldScrollX="+oldScrollX+"oldScrollY="+oldScrollY+"layout_consult="+layout_consult.getMeasuredHeight()); | |
| 111 | 109 | } |
| 112 | 110 | }); |
| 113 | 111 | } |
| ... | ... | @@ -144,7 +142,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
| 144 | 142 | |
| 145 | 143 | private void initBanners() { |
| 146 | 144 | xBanner.setData(imgesUrl, describeList); |
| 147 | - xBanner.setPointsIsVisible(false); | |
| 145 | +// xBanner.setPointsIsVisible(false); | |
| 148 | 146 | xBanner.setmAdapter(new XBanner.XBannerAdapter() { |
| 149 | 147 | @Override |
| 150 | 148 | public void loadBanner(XBanner banner, Object model, View view, int position) { | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
| ... | ... | @@ -2,12 +2,9 @@ package com.shunzhi.parent.ui.fragment; |
| 2 | 2 | |
| 3 | 3 | import android.os.Bundle; |
| 4 | 4 | import android.os.CountDownTimer; |
| 5 | -import android.os.Handler; | |
| 6 | -import android.os.Message; | |
| 7 | 5 | import android.support.annotation.NonNull; |
| 8 | 6 | import android.support.annotation.Nullable; |
| 9 | 7 | import android.text.TextUtils; |
| 10 | -import android.util.Log; | |
| 11 | 8 | import android.view.View; |
| 12 | 9 | import android.widget.ImageView; |
| 13 | 10 | import android.widget.TextView; |
| ... | ... | @@ -29,7 +26,6 @@ import java.util.ArrayList; |
| 29 | 26 | import java.util.List; |
| 30 | 27 | |
| 31 | 28 | import cn.jzvd.JZVideoPlayerStandard; |
| 32 | -import timber.log.Timber; | |
| 33 | 29 | |
| 34 | 30 | public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> |
| 35 | 31 | implements ConsultContract.IConsultView { |
| ... | ... | @@ -80,11 +76,11 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult |
| 80 | 76 | xBanner.setVisibility(View.GONE); |
| 81 | 77 | AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); |
| 82 | 78 | // mPresenter.getBanners("0", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); |
| 83 | - mPresenter.getBanners("0", "余杭区"); | |
| 79 | + mPresenter.getBanners("0", ""); | |
| 84 | 80 | } else { |
| 85 | 81 | jiecaoVideo.setVisibility(View.GONE); |
| 86 | 82 | xBanner.setVisibility(View.VISIBLE); |
| 87 | - mPresenter.getBanners("1", "余杭区"); | |
| 83 | + mPresenter.getBanners("1", ""); | |
| 88 | 84 | // mPresenter.getBanners("1", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); |
| 89 | 85 | } |
| 90 | 86 | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
| ... | ... | @@ -109,18 +109,22 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist |
| 109 | 109 | idCodeLayout.setVisibility(View.GONE); |
| 110 | 110 | passwordLayout_new.setVisibility(View.GONE); |
| 111 | 111 | loginAndRegister.setText("登录"); |
| 112 | + password.setHint("请输入密码:6~16个字符"); | |
| 112 | 113 | denglu.setVisibility(View.VISIBLE); |
| 113 | 114 | zhuce.setVisibility(View.GONE); |
| 114 | 115 | } else if ("注册".equals(typepage)) { |
| 115 | 116 | idCodeLayout.setVisibility(View.VISIBLE); |
| 116 | 117 | passwordLayout_new.setVisibility(View.GONE); |
| 117 | 118 | loginAndRegister.setText("注册"); |
| 119 | + password.setHint("请设置密码:6~16个字符"); | |
| 118 | 120 | denglu.setVisibility(View.GONE); |
| 119 | 121 | zhuce.setVisibility(View.VISIBLE); |
| 120 | 122 | } else if ("找回密码".equals(typepage)) { |
| 121 | 123 | idCodeLayout.setVisibility(View.VISIBLE); |
| 122 | 124 | passwordLayout_new.setVisibility(View.VISIBLE); |
| 123 | 125 | loginAndRegister.setText("确定"); |
| 126 | + password.setHint("请设置新密码:6~16个字符"); | |
| 127 | + et_password_new.setHint("请再次输入密码:6~16个字符"); | |
| 124 | 128 | denglu.setVisibility(View.GONE); |
| 125 | 129 | zhuce.setVisibility(View.GONE); |
| 126 | 130 | } | ... | ... |
app/src/main/res/layout/fragment_mine.xml
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | android:layout_width="40dp" |
| 122 | 122 | android:layout_height="wrap_content" |
| 123 | 123 | android:layout_gravity="center_vertical" |
| 124 | - android:text="3" | |
| 124 | + android:text="" | |
| 125 | 125 | android:textSize="@dimen/sp_18" |
| 126 | 126 | android:textColor="@color/textRed" |
| 127 | 127 | /> | ... | ... |