Commit 6c90ae8c87865e412cebf44468d3ca40e2b31843
1 parent
fc0ad32a
Exists in
yxb_dev
and in
1 other branch
no message
Showing
6 changed files
with
13 additions
and
8 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/api/Consult.java
| ... | ... | @@ -35,6 +35,6 @@ public interface Consult { |
| 35 | 35 | |
| 36 | 36 | @FormUrlEncoded |
| 37 | 37 | @POST("RoleLogin/GetToken") |
| 38 | - Observable<JsonObject> loginVote(@Field("username") String username, @Field("password") String password); | |
| 38 | + Observable<String> loginVote(@Field("username") String username, @Field("password") String password); | |
| 39 | 39 | |
| 40 | 40 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/contract/consult/ConsultContract.java
| ... | ... | @@ -42,7 +42,7 @@ public interface ConsultContract { |
| 42 | 42 | |
| 43 | 43 | Observable<JsonObject> getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex); |
| 44 | 44 | |
| 45 | - Observable<JsonObject> loginVote(String phoneNum,String password); | |
| 45 | + Observable<String> loginVote(String phoneNum,String password); | |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | interface IConsultView extends IBaseFragment { | ... | ... |
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
| ... | ... | @@ -48,9 +48,9 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | @Override |
| 51 | - public Observable<JsonObject> loginVote(String phoneNum, String password) { | |
| 51 | + public Observable<String> loginVote(String phoneNum, String password) { | |
| 52 | 52 | return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL_VOTE) |
| 53 | - .loginVote(phoneNum,password).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | |
| 53 | + .loginVote(phoneNum,password).compose(RxHelper.<String>rxSchedulerHelper()); | |
| 54 | 54 | // return null; |
| 55 | 55 | } |
| 56 | 56 | ... | ... |
app/src/main/java/com/shunzhi/parent/presenter/consult/ConsultPresenter.java
| 1 | 1 | package com.shunzhi.parent.presenter.consult; |
| 2 | 2 | |
| 3 | +import android.util.Log; | |
| 3 | 4 | import android.view.View; |
| 4 | 5 | import android.widget.LinearLayout; |
| 5 | 6 | |
| ... | ... | @@ -133,15 +134,15 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { |
| 133 | 134 | |
| 134 | 135 | @Override |
| 135 | 136 | public void loginVote(String phoneNum, String password, final int position) { |
| 136 | - mRxManager.register(mIModel.loginVote(phoneNum, password).subscribe(new Consumer<JsonObject>() { | |
| 137 | + mRxManager.register(mIModel.loginVote(phoneNum, password).subscribe(new Consumer<String>() { | |
| 137 | 138 | @Override |
| 138 | - public void accept(JsonObject jsonObject) throws Exception { | |
| 139 | - ToastUtils.showToast(jsonObject.toString()); | |
| 139 | + public void accept(String str) throws Exception { | |
| 140 | 140 | mIView.showVote(position); |
| 141 | 141 | } |
| 142 | 142 | }, new Consumer<Throwable>() { |
| 143 | 143 | @Override |
| 144 | 144 | public void accept(Throwable throwable) throws Exception { |
| 145 | + Log.e("111111",throwable.getMessage()); | |
| 145 | 146 | mIView.showVote(position); |
| 146 | 147 | } |
| 147 | 148 | })); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| ... | ... | @@ -11,6 +11,7 @@ import android.support.annotation.Nullable; |
| 11 | 11 | import android.support.annotation.RequiresApi; |
| 12 | 12 | import android.support.v4.widget.NestedScrollView; |
| 13 | 13 | import android.text.TextUtils; |
| 14 | +import android.util.Log; | |
| 14 | 15 | import android.view.View; |
| 15 | 16 | import android.widget.EditText; |
| 16 | 17 | import android.widget.ImageView; |
| ... | ... | @@ -241,6 +242,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
| 241 | 242 | for (int i = 0; i < guangGaoBeanList.size(); i++) { |
| 242 | 243 | imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); |
| 243 | 244 | describeList.add(guangGaoBeanList.get(i).describe); |
| 245 | + Log.e("aaaa",guangGaoBeanList.get(i).url); | |
| 244 | 246 | imgWebUrl.add(guangGaoBeanList.get(i).url); |
| 245 | 247 | } |
| 246 | 248 | initBanners(); | ... | ... |
app/src/main/res/layout/fragment_mine.xml
| ... | ... | @@ -385,7 +385,9 @@ |
| 385 | 385 | android:background="@drawable/shape_xueqing_radius8" |
| 386 | 386 | android:text="测试入口" |
| 387 | 387 | android:textColor="@color/white" |
| 388 | - android:textSize="@dimen/size_dp_16" /> | |
| 388 | + android:textSize="@dimen/size_dp_16" | |
| 389 | + android:visibility="gone" | |
| 390 | + /> | |
| 389 | 391 | |
| 390 | 392 | </LinearLayout> |
| 391 | 393 | </ScrollView> | ... | ... |