Commit 42f9ce5c authored by linfeng's avatar linfeng

bug修复

parent fc2019fb
......@@ -3,8 +3,8 @@ package com.xxfc.discovery.api;
import com.frame.rv.config.RvFrameConfig;
public interface DiscoveryApi extends RvFrameConfig {
// String IMA_BASEUSRL = "https://imapi.dfangche.com";
String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
String IMA_BASEUSRL = "https://imapi.dfangche.com";
// String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
//问题列表
String DISCOVERY_IMQUESTION_LIST = HOST + "/api/im/imQuestion/list";
......
......@@ -632,7 +632,6 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
}
private void setRecommendGood(HomeHotGoodListBean data) {
mAdapter.getData().clear();
mAdapter.setType(hotType);
mAdapter.setNewData(data.getData());
}
......@@ -803,7 +802,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
tvHotEntertainmentCamp.getPaint().setFakeBoldText(false);
tvHotCarRental.getPaint().setFakeBoldText(false);
tvSeeMorePopular.setText("更多热门旅行线路");
mAdapter.getData().clear();
mAdapter.notifyDataSetChanged();
recommendGood("2");
hotType = "2";
......@@ -823,7 +823,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
tvHotEntertainmentCamp.getPaint().setFakeBoldText(true);
tvHotCarRental.getPaint().setFakeBoldText(false);
tvSeeMorePopular.setText("更多娱乐营地");
mAdapter.getData().clear();
mAdapter.notifyDataSetChanged();
recommendGood("3");
hotType = "3";
} else if (id == R.id.ll_item_hot_car_rental) {
......@@ -843,8 +844,11 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
tvHotCarRental.getPaint().setFakeBoldText(true);
tvSeeMorePopular.setText("更多优质车型");
mAdapter.getData().clear();
mAdapter.notifyDataSetChanged();
recommendGood("4");
hotType = "1";
} else if (id == R.id.tv_see_more_popular) {
//查看更多热门
if ("2".equals(hotType)) {
......
......@@ -12,7 +12,13 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import com.base.utils.tools.android.IntentUtil;
import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.browse.ActivityImageBrowseUrl;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.home.R;
import com.rv.home.R2;
......@@ -21,6 +27,9 @@ import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.home.rv.module.basic.presenter.PickerPresenter;
import com.yuyife.okgo.OkGoUtil;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import static com.ruiwenliu.wrapper.weight.webview.SafeWebView.hasKitkat;
......@@ -117,10 +126,25 @@ public class DepositefundProgressDetailsActivity extends BaseStatusActivity<Pick
}
public class AndroidJs {
@JavascriptInterface
public String getToken() {
return OkGoUtil.getToken();
}
@JavascriptInterface
public void showImage(int selectPosition,String imageJson) {
if (!TextUtil.isEmpty(imageJson)) {
List<String> imagesList = new Gson().fromJson(imageJson,
new TypeToken<List<String>>() {
}.getType());
Bundle bundle = new Bundle();
bundle.putInt(ActivityImageBrowseUrl.KEY_BACKGROUND, R.color.colorPrimary);
bundle.putInt(ActivityImageBrowseUrl.KEY_SELECTPOSITION,selectPosition);
bundle.putStringArrayList(ActivityImageBrowseUrl.KEY_IMAGE, (ArrayList<String>) imagesList);
IntentUtil.startActivity(mActivity, ActivityImageBrowseUrl.class, bundle);
}
}
}
......
......@@ -16,6 +16,8 @@ import android.view.View;
import com.alipay.sdk.app.PayTask;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.frame.base.bus.CancelOrderEvent;
import com.frame.base.bus.Observer;
import com.frame.base.bus.PaymentSuccessfulEvent;
import com.frame.base.bus.RxBus;
import com.frame.rv.config.RvFrameConfig;
......@@ -138,12 +140,12 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
}
private Disposable disposable;
private Disposable disposables;
@SuppressLint("CheckResult")
private void initRxBus() {
disposable = RxBus.tObservable(PaymentSuccessfulEvent.class)
disposables = RxBus.tObservable(PaymentSuccessfulEvent.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<PaymentSuccessfulEvent>() {
@Override
......@@ -164,13 +166,23 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
}
}
});
RxBus.tObservable(CancelOrderEvent.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CancelOrderEvent>(disposable) {
@Override
public void onNext(CancelOrderEvent event) {
onRefresh();
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();
if (disposable != null && !disposable.isDisposed()) {
disposable.dispose();
if (disposables != null && !disposables.isDisposed()) {
disposables.dispose();
}
}
......
......@@ -6,7 +6,8 @@
android:background="@color/colorLine"
android:orientation="vertical">
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -268,7 +269,7 @@
android:clickable="false"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
android:visibility="invisible">
<ImageView
android:layout_width="@dimen/size_25"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment